httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject idle server processes not going away
Date Wed, 30 May 2001 19:07:16 GMT
This is easy to see with prefork and a config or platform which
requires serialization around select/accept.

Pound on apache to create some extra server processes then stop
pounding and take a look at the server-status page (or the output of
ps).  A bunch of processes will stay in 'I' (SERVER_IDLE_DIE) state
indefinitely.  They know they need to go away because the signal
handler ran but they are stuck waiting on the accept mutex.

To get rid of them you need to pound on the server some more.

We ran into problems before because we were doing too much in the
signal handler.  Now perhaps we're not doing enough?


. do more stuff in the signal handler or call [sig]longjump() to get
  back to the main flow; unfortunately, this may not be better
  than the old logic to do a bunch of stuff in the signal handler
  because we don't know what mutexes we're holding or what other sorts
  of cleanups are needed; I'm not sure we can trust pool cleanups to
  solve all problems here

. make the mutex lock call return EINTR and then go back to the top of
  the loop and find out that we're supposed to go away

  we'd assume that if it is somewhere besides the mutex lock then it
  is about to exit anyway

  (this seems to be the least risky, but is ugly from the APR point of
  view since EINTR isn't a common concept)

. ???

Jeff Trawick | | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message