Re: pgbench could not send data to client: Broken pipe - Mailing list pgsql-performance

From Tom Lane
Subject Re: pgbench could not send data to client: Broken pipe
Date
Msg-id 8037.1283973026@sss.pgh.pa.us
Whole thread Raw
In response to pgbench could not send data to client: Broken pipe  (David Kerr <dmk@mr-paradox.net>)
Responses Re: pgbench could not send data to client: Broken pipe  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-performance
David Kerr <dmk@mr-paradox.net> writes:
> I'm running pgbench with a fairly large # of clients and getting this error in my PG log file.
> LOG:  could not send data to client: Broken pipe

That error suggests that pgbench dropped the connection.  You might be
running into some bug or internal limitation in pgbench.  Did you check
to make sure pgbench isn't crashing?

> (I had to modify the pgbench.c file to make it go that high, i changed:
> MAXCLIENTS = 2048

Hm, you can't just arbitrarily change that number; it has to be less
than whatever number of open files select(2) supports.  A look on my
Fedora 13 box suggests that 1024 is the limit there; I'm not sure which
Red Hat variant you're using but I suspect it might have the same limit.

As of the 9.0 release, it's possible to run pgbench in a "multi thread"
mode, and if you forced the subprocess rather than thread model it looks
like the select() limit would be per subprocess rather than global.
So I think you could get above the FD_SETSIZE limit with a bit of
hacking if you were using 9.0's pgbench.  No chance with 8.3 though.

(This suggests BTW that we might want to expose the thread-versus-fork
choice in a slightly more user-controllable fashion, rather than
assuming that threads are always better.)

            regards, tom lane

pgsql-performance by date:

Previous
From: David Kerr
Date:
Subject: pgbench could not send data to client: Broken pipe
Next
From: Greg Smith
Date:
Subject: Re: pgbench could not send data to client: Broken pipe