By using snoop and truss on a version of pkg(5) with the old transport, I noticed the following:

When pkg(1) sends a HTTP/1.1 request, it includes the "Connection: close" HTTP header. However, the Apache server translates this header into a "Connection: Keep-Alive". This results in a pkg.depotd process keeping the connection open when it is done, but since the client closes the connection, the Apache server never sends another request to that port. 60 seconds later, pkg.depotd times out and sends a 408 response. So if you have 16 threads, this means that a pkg.depotd fronted by an Apache server will only be able to process 16 requests per minute (or whatever number of threads you have).

We found that adding

   SetEnv proxy-nokeepalive 1

in the proxy_http_module settings fixes this behavior.

Now clearly, once we are using the new transport, we'll want to change this back so that keep alives will actually work, but if you are working with the old transport, this may be related to the problem you are seeing.

Tom


Dan Price wrote:
On Wed 08 Jul 2009 at 04:11PM, Dan Price wrote:
On Wed 08 Jul 2009 at 02:27PM, [email protected] wrote:
On Wed, Jul 08, 2009 at 02:10:31PM -0700, Alan Steinberg wrote:
Our pkg.depotd is running with 50 threads and a 60-second timeout.

Our apache2 httpd.conf file contains:
ProxyTimeout 30
ProxyRequests Off
AllowEncodedSlashes On
ProxyPass /dev-private http://oursystem.domain:10800 nocanon disablereuse=On

Do we have a bad setup somewhere, or is there a bug in the new transport code?
There are likely problems in your setup.  Setting disablereuse=on will
cause performance issues with the new transport.  It performs better
when it's able to take advantage of connection re-use.  I'm not an
Apache expert, but perhaps someone else can offer more guidance about
your other choices.
Sure-- it's not ideal to disable reuse, but doing so will only cause
performance to be lower than the optimum.  It shouldn't cause the
timeout issues Alan has seen.

Umm, yeah, except in the case that your apache workers overwhelm your
total depot threads.

But it seems odd to me that RE would wind up in that scenario.  You
sort-of need internet scale deployment to see that happen.

        -dp


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to