Re: The way Apache is restarted and the WO adaptor
Patrick Middleton <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
On Friday, January 9, 2004, at 04:28 pm, Laura Remondino wrote: > Happy New Year to All. > > I was wondering if any of you has ever observed an Apache server > suddenly > not loading the WO module as expected. > Here is my environment: > > WO 5.2.1 > JDK 1.3.08 > Apache 1.3.27 > SUN/Solaris 5.8 > > We have restarted Apache every night via a graceful restart for ages, > but > now, for some reason that I can't explain, sometimes we need a manual > stop/start to force the WO module load. Mmmm. As I recall, there is a master apache instance that manages lots of other ones, and they all need to load the adaptor module, and there needs to be some interprocess communication between them. For apache on UNIX, this is usually achieved using shared memory, by the master instance creating a file, typically called /tmp/WOAdaptorState, which is then mapped into memory by all instances. UNIX being UNIX, once this file exists and is being used, the master instance can delete it. The file will effectively disappear, but it will continue to exist until the last process accessing it exits -- see also 'man 2 unlink' , 'man 3 remove', and 'apropos delete'. Suppose, then, an instance of apache crashed, and scrawled all over the shared memory, and then a different instance of apache read some of that corrupted memory, and hung. It might then not shut down at 'apachectl graceful', so the existing region of shared memory might continue to exist. It's possible the WebObjects module could have a problem with that, would detect that there was a problem and then unregister its apache request handler. But this is a lot of supposition on my part. Generally, then, the next time you see this, before doing an 'apachectl stop'/'apachectl start', get a 'ps' listing, and try to see if there is a wedged 'httpd' process; try 'kill -9'ing it yourself, then see if WebObjects starts working correctly after 'apachectl graceful'. What do other people think? -- Patrick