Forum Moderators: phranque

Message Too Old, No Replies

Unnecessary spawning of processes in Apache

Apache creates too many processes and becomes unresponsive

         

phild66

11:26 am on Apr 12, 2007 (gmt 0)

10+ Year Member



I have had a good trawl through the posts here and several mention Apache and "too many processes", but none seem to relate specifically to what I'm seeing.

The site I'm dealing with is hosted in Websphere but is fronted (with logon screen) on Apache, running on Linux on a separate piece of hardware. Authentication is handled using a Siteminder plug-in to Apache which then redirects to the application itself on Websphere.

Under certain conditions (as yet not fully determined) and even under very low load (i.e. one user), in response to the first authenticated page load, Apache sometimes spawns 160 processes and then stops responding as it's hit its maximum. The site is then inaccessible until Apache kills the processes off, currently set to 10 minutes.

The problem seems never to occur after any first use of the site by any user. It seems to be easier to reproduce on first access from a PC which has never been used before, but can sometime be reproduced by deleting cached content and login in again.

The application and Websphere can be demonstrated to be accessible by bypassing Apache.

jdMorgan

3:39 pm on Apr 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the error depends on the client state, as implied by the "clear the cache" factor, then take a look at the client-state dependencies: I'd suggest looking at the 'domains' of any auth headers and/or cookies sent by the client on the first post-auth request, and seeing if there is a 'scoping problem' that might lead to an infinite loop of re-auths, rewrites, reverse-proxy calls to the back-end, or redirects.

I don't know doodly about Websphere, so these are just suggestions based on theory.

The "Live HTTP Headers" Firefox extension can be very useful for examining HTTP request and response headers, in the absence of any more sophisticated line analyzers.

Jim