Re: pgbench could not send data to client: Broken pipe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Kerr <dmk(at)mr-paradox(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: pgbench could not send data to client: Broken pipe
Date: 2010-09-08 19:10:26
Message-ID: 8037.1283973026@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David Kerr <dmk(at)mr-paradox(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2010-09-08 19:27:34 Re: pgbench could not send data to client: Broken pipe
Previous Message David Kerr 2010-09-08 17:46:29 pgbench could not send data to client: Broken pipe