httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: solaris HUP blues
Date Sun, 27 Jul 1997 17:31:16 GMT

On Sat, 26 Jul 1997, Roy T. Fielding wrote:

> So, the question is which of our configuration variables/structures can
> be read to see how many per-process sockets are needed, and can we change
> the slack code so it doesn't do anything if that number is low?

It's pretty easy.  It's just like this:

    if (listeners == NULL) {
	num_sockets = 1;
    } else {
	listen_rec *lr;

	num_sockets = 0;
	for (lr = listeners; lr; lr = lr->next) {

I'd be happy with a change for SOLARIS2 only that used that, and
if (num_sockets > 120), use slack on sockets and print/log a warning that
SIGHUP probably won't work.  If num_sockets <= 120 then don't use slack
on sockets.

120 was chosen because 120 sockets probably means 120 error logs, which
are also under 256, so that's 240 descriptors under 256.  That leaves
16ish slack under 256.  The other logs are over 255 because they're still
slacked.  You could be more conservative and use 100...

This gets the benefits of both worlds I think.  The folk with a single
socket get the benefit of slacking on their logs, and the folks with multiple
sockets get more vhosts before they run out of descriptors < 256.

BTW, 1.2.1 doesn't have the two extra tests I put into 1.3 -- ap_slack()
will always dup, in 1.3 it only dups only if the descriptor isn't already
above the appropriate line.  It might be a good idea to backpatch that.

Marc you wanna do the honours?


View raw message