Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apachectl gracefull restart runaway process problem

Status
Not open for further replies.

csgonan

MIS
May 2, 2007
118
US
I put up a new apache server:

Server version: Apache/2.2.4 (Unix) - Solaris 10 - Sparc
FILE /usr/local/apache2/bin/httpd
/usr/local/apache2/bin/httpd: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

When I do a apachectl graceful restart,

- the number of processes increases equal the number of Min spare.
- the server status screen shows all G (gracefully finishing) for the old and new processes (not idle processes)
- the # requests currently being processed never changes

These are the settings for both servers.
----------------------
StartServers 20
MinSpareServers 40
MaxSpareServers 75
ServerLimit 500
MaxClients 500


I am using these same settings on a live server running 2.2.3 - Solaris 8, and although it has started 52 processes, the status screen does not display G for each processes.
4 requests currently being processed, 49 idle workers
---------------------------

Any ideas how to stop the runaway spawning and not displaying G on the status screen?

Thanks
 
I was doing some research and found this. Mod_perl is called with a Load_Module statement in my httpd.conf am not sure how this affects things. Ths is a brand new install of Apache 2.2.4 with mod_perl 2. I'm not even running any scripts now, just running apachectl graceful and then looking at the status screen (where I see lots of G's for the each existing and new process it starts). I don't even have any users on yet.


This is from that code article:
If after doing a graceful restart (e.g, by sending kill -USR1) you see via mod_status or Apache::VMonitor that a process is stuck in state G (Gracefully finishing), it means that the process is hanging in perl_destruct( ) while trying to clean up. If you don't need the cleanup, see the previous section on how to disable it.

This is the section before

If you are certain that your code does not contain any END blocks or DESTROY methods to be run during child server shutdown, you can avoid the delays by setting the PERL_DESTRUCT_LEVEL environment variable to -1. Be careful, however; even if your code doesn't include any END blocks or DESTROY methods, any modules you use( ) might
 
I recompiled another version of apache that is working on a different server and I didn't have the problem with graceful restarts UNTIL I uncommented the line for ssl (I have openssl 0.9e). When I included the ssl.conf, the graceful restarts wouldn't end for the previous processes and it spawns new ones (which I believe it is supposed to) The parent process ID for the new and the old are the same. I even brought in the ssl.conf from that server and the problem remains.

Any ideas?

7824 in state: G , 7825 in state: G , 7826 in state: G
7827 in state: G , 7828 in state: G , 7838 in state: _
7839 in state: _ , 7840 in state: _ , 7841 in state: W
7842 in state: _ , 7843 in state: _ ,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top