/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-07 / concurrent connections / extreme traffic problem with BIO_gets

[ << ] [ >> ]

[ Logging and Stand-by servers / James Billson ... ] [ pound and SSL wildcard certs [scanned] / Veit ... ]

concurrent connections / extreme traffic problem with BIO_gets
Peter Starzer <Peter.Starzer(at)electronicsales.de>
2005-07-07 12:57:03 [ FULL ]
Hi,

I've got 2 backend-servers, each server can handle 75 requests/sec. Pound can 
handle 3-4 requests/sec, i browsed through the source and found that:

there is a problem in function get_headers (http.c line 443):
while((res = BIO_gets(in, buf, MAXBUF)) > 0)

If you process 3 or more concurrent requests the BIO_gets returns nothing 
(from the backend server!).

line 449:
if(res <= 0) {
      /* this is expected to occur only on client reads */     
//    logmsg(LOG_WARNING, "headers: bad starting read");
       return NULL;
}


Any idea how to fix that?

thanks
Peter

Re: [Pound Mailing List] concurrent connections / extreme traffic problem with BIO_gets
Robert Segall <roseg(at)apsis.ch>
2005-07-07 13:24:45 [ FULL ]
On Thu, 7 Jul 2005 12:57:03 +0200 Peter Starzer
<Peter.Starzer(at)electronicsales.de> wrote:
[...]

If your Pound only does 3-4 requests per second there are some major
problems. I normally see over 50 reqs/sec even on an old PIII/800.

My primary suspect would be the libraries you use. Could it be that you
have multiple versions (for example OpenSSL with and without thread
support)?

I suggest you check your install and libraries. The piece of code you
mention has been around forever - it's very unlikely that it would be
the culprit.[...]

Re: [Pound Mailing List] concurrent connections / extreme traffic problem with BIO_gets
Peter Starzer <Peter.Starzer(at)electronicsales.de>
2005-07-07 14:25:01 [ FULL ]
> If your Pound only does 3-4 requests per second there are some major[...]

how do i check which libraries pound use?

I installed openssl into /usr/local/ssl with ./config threads

then i compilled pound:
./configure --with-ssl=/usr/local/ssl/

OpenSSL> version
OpenSSL 0.9.8 05 Jul 2005

if i do a apache benchmark with only 10 concurrent requests:
ab -q -n 10 -c 10 http://domain.com 

pound only logs errors:
Jul  7 13:52:33 localhost pound: response error read from 
IP_BACKEND-SERVER:80: Success
Jul  7 13:52:33 localhost last message repeated 2 times
Jul  7 13:52:34 localhost pound: response error read from 
IP_BACKEND-SERVER:80: Success
Jul  7 13:52:34 localhost last message repeated 4 times
Jul  7 13:52:34 localhost pound: response error read from 
IP_BACKEND-SERVER:80: Success
Jul  7 13:52:34 localhost last message repeated 4 times
Jul  7 13:52:35 localhost pound: response error read from 
IP_BACKEND-SERVER:80: Success
Jul  7 13:52:35 localhost last message repeated 4 times
[...]

 /* this is expected to occur only on CLIENT reads */
occurs on SERVER reads if i send 3 or more concurrent requests, I think 
something must be wrong here.

Re: [Pound Mailing List] concurrent connections / extreme traffic problem with BIO_gets
Robert Segall <roseg(at)apsis.ch>
2005-07-07 17:48:46 [ FULL ]
On Thu, 7 Jul 2005 14:25:01 +0200 Peter Starzer
<Peter.Starzer(at)electronicsales.de> wrote:
[...]

ldd (or whatever you system supports)?
[...]

Did you also configure your system to use it (e.g. ldconfig)?
[...]

That's nice. So you used the include files from the threaded OpenSSL,
but the .so libraries are unthreaded...
[...]

Not surprising.

I suggest you modify the Pound Makefile to use the static version of the
OpenSSL libraries you compiled. It's probably the safest way.[...]

MailBoxer