Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 1997 07:43:46 -0600 (MDT)
From:      Marc Slemko <marcs@znep.com>
To:        Scott Halbert <thor@thuntek.net>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Apache Socket Starvation Bug in 1.2
Message-ID:  <Pine.BSF.3.95.970506073156.2635A-100000@alive.znep.com>
In-Reply-To: <3.0.32.19970506003705.01730f30@thuntek.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 May 1997, Scott Halbert wrote:

> At 11:25 PM 5/5/97 -0600, Marc Slemko wrote:
> >On Mon, 5 May 1997, Scott Halbert wrote:
> >
> >> Is anyone familiar with the problems with Apache versions 1.2 with socket
> >> starvation?  The problem manifests itself as the server locking itself up
> >> and clients hanging with "waiting for reply".  For me a KILL -HUP will get
> >> things going again.
> >> 
> >> To quote the apacheweek article, "This problem only affects systems which 
> >> do not define USE_FLOCK_SERIALIZED_ACCEPT or USE_FCNTL_SERIALIZED_ACCEPT
> >> in conf.h (this includes SunOS 4, FreeBSD, BSDI and some others)."
> >> 
> >> Here are some URLS documenting the bug:
> >> 
> >> 	http://www.apache.org/bugdb.cgi/full/467
> >> 	http://www.apacheweek.com/issues/97-04-25
> >> 
> >> My problem is that the Apache workaround does not work for me.  Turning
> >> on USE_FLOCK_SERIALIZED_ACCEPT does not help and
> USE_FCNTL_SERIALIZED_ACCEPT
> >> hangs the server immediately.
> >
> >What version of FreeBSD are you using?  You may not have a /usr/tmp and
> >Apache is braindead and just uses /usr/tmp
> 
> Just now I'm running FreeBSD 2.2-BETA_A.  I do have a /usr/tmp but it
> is not set up like a normal /tmp (no group or world write).  I'm not 
> sure it access this directory as my 'User' user or as root.  If root,
> it should have been able to write to it.

It opens the file as root, but expects to access the descriptor as the
user in your User directive.  Normally this means that if root can access
it you are OK, but some OSes are odd about it.  

> >> It sure seems to me that I've got something unique in my configuration.
> >> If this happened to all apache 1.2 servers under FreeBSD, I'd hear this
> >> group freaking out.  I daresay that a very high majority of FreeBSD ISPs
> >> use Apache. Maybe some of you have seen it and were in the same boat?
> >> 
> >> This problem is upsetting my customers and making me pull my hair out.
> >> 
> >> Maybe this is not exactly the bug I'm chasing, though it sure looks like
> >> it.  Maybe I've got my timeouts and idles messed up in my configuration
> >> file.
> >
> >Are you using multiple Listen directives?  That is the only case where the
> >bug you refer to above shows up.
> 
> Definately.  Right now I have about 100 domains.  The thing I noticed though
> is that when I put them all in one server, they system seems to lock up
> immediately.  So, I divided my servers into about 6 servers with no more
> than 15 servers in year.  This was a wild goose chase.

How many Listen directives do you have and how many virtual hosts do you
have?  In 99% of the cases with virtual hosts, it is not necessary or
desirable to have a Listen directive for each virtual host.  If you can
avoid that it is a very very good thing. 

[...]
> We'll see how that works.  I guess I should certainly see files showing
> up in /var/tmp now.

No.  Only one file is created, and it is unlinked almost as soon as it is
opened; the only thing used for locking is the file descriptor so the file
doesn't have to actually exist on disk any more.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970506073156.2635A-100000>