Author |
|
tuxbully
Joined: 08 Oct 2008 Posts: 4
|
Posted: Wed 08 Oct '08 7:20 Post subject: Error Log |
|
|
Can anyone help me trouble shoot the following error message in the apache error log?
Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.
[Tue Sep 23 06:53:54 2008] [notice] Parent: Received restart signal -- Restarting the server.
I have searched this forum and Google for answers and have found several conflicting pieces of information. With that said... I am basically looking for the correct value for this directive.
Here is the severs configuration and some history for the said issue.
2 Servers with:
Windows 2003 Server SP 2
Dual Quad Core Xeon’s
4 GB of Memory
15 K SCSI drives Mirrored
Apache/2.0.59 (Win32)
Active Perl 5.8.7 Build 815
Propriety Vendor Application Serving up CGI (Built/Configured and Shipped by the Vendor)
SQL 2007 Back-end Data Base Server
Active User on both serves averages around 30
The compliant and or issue reported by the users is that the Network is slowww (right not ) In any event, after reviewing the complaint; I looked at the users problem.
Hour Glass shown within the application an a unresponsive web server for all users.
This condition only occurs for about 5 minutes so trouble shooting is very difficult. The only thing that stands out is the error message within the apache error logs; which correlates to the same time frame. My guess is that the apache is restarting and causing the hung condition and once apache is restarted the problem goes away. The error message is happening numerous times throughout the day without any type of pattern. The only thing that shows a pattern is the reported slowness with the errors seen in the log. I am thinking, an adjustment to the MaxRequestsPerChild directive will fix the problem but I don’t know which value to use and if any other directives need new values.
The current values are as follows
<IfModule mpm_winnt.c>
ThreadsPerChild 512
MaxRequestsPerChild 100000
</IfModule>
Thanks
tuxbully |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Oct '08 10:50 Post subject: |
|
|
Under Windows it is recommend to MaxRequestsPerChild to 0 which mean unlimited.
If you set it not to 0 apache restarts after the number of requests you have set. In your case after 100000 requests.
For your slow network. Did you enable mod_deflate to save bandwidth? |
|
Back to top |
|
tuxbully
Joined: 08 Oct 2008 Posts: 4
|
Posted: Wed 08 Oct '08 15:08 Post subject: |
|
|
James,
Thanks for the info. In regards to the slow network statement it was a smart comment. I am a network engineer by trade and I was regurgitating the typical application answer we hear from our vendors.
It’s the Network….. In reality, it’s highly unlikely because both web servers have gig connections.
In my opinion the vendor probably has an issue with their code and they set this value to mask performance issues. The default httpd.conf file is still on the server and as you pointed out, the vaule is 0
The last and final questions that I have are as so (If you don’t mind)
What is the max value for the MaxRequestsPerChild directive. Basically does Apache have a hard limit for this setting. Should I even consider setting this higher.
If I set the value to 0 and the code is written poorly will the server omit a different problem. I am guesing that the CPU and memory will start to run out of control if the code truly has a problem.
Also how can I determine the count of connections that web server has serviced since the last restart.
Thanks Again for all of your help.
TuxBully |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Oct '08 15:35 Post subject: |
|
|
The max value for MaxRequestsPerChild is 0 cause apache never restarts.
If the cgi program causes apache to run out of memory you should use an external handler. For PHP I use mod_fcgid to separate PHP from apache. Maybe you can modify it, so that it runs with your cgi or are that compiled cgi's? If it is compiled fcgid won't work.
How much memory usage and cpu usage do you have? |
|
Back to top |
|
tuxbully
Joined: 08 Oct 2008 Posts: 4
|
Posted: Wed 08 Oct '08 18:20 Post subject: |
|
|
The servers are basically sleeping. CPU and memory are sitting at 20 % usage, at best.
I just don't understand why the vendor would change the default vaule from 0 to 100000. It would seem to me that they know about a problem and they have set the directive to avoid the problem.
Thanks,
Tuxbully |
|
Back to top |
|
tuxbully
Joined: 08 Oct 2008 Posts: 4
|
Posted: Wed 08 Oct '08 19:37 Post subject: |
|
|
I forgot to mention that the config does have a handler
<Location /perl-reload>
SetHandler modperl
PerlResponseHandler apache_reload
Note sure how it works or what it exactly does but it's there. Can you shed some light if you wouldn't mind.
Thanks Again |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Oct '08 21:45 Post subject: |
|
|
I've never seen that before. But SetHandler modperl sets mod perl as "actor" for that location like status handler for server-status page.
The only link I found for apache_reload is http://incubator.apache.org/ip-clearance/perl-apache_reload.html
the second link for PerlResponseHandler is http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlResponseHandler
I'm not sure why your apache should restart after 100000 requests. Maybe that is a thing from the same software under *nix system. Cause on Linux / unix systems the default value is 10000 and not 0 like on windows. On windows there is a different philosophie how apache works. On *nix Systems you start a lot of apache instances so there it is ok when you restart one of it all the others will serv in that situation.
I recommend you to ask your vender what it is all about that if you still worry |
|
Back to top |
|
AMailer
Joined: 25 Sep 2006 Posts: 45 Location: Canada
|
Posted: Thu 16 Oct '08 3:48 Post subject: |
|
|
Hey could you tell me you're setup for PHP with Apache James Blond? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 16 Oct '08 9:10 Post subject: |
|
|
My setup
Code: |
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
IPCCommTimeout 40
IPCConnectTimeout 10
MaxProcessCount 8
OutputBufferSize 64
ProcessLifeTime 60
MaxRequestsPerProcess 500
DefaultMinClassProcessCount 0
SetEnv PHPRC "C:/server2/php"
PHP_Fix_Pathinfo_Enable 1
<Directory C:/server2/www/>
AddHandler fcgid-script .php
Options Indexes FollowSymLinks ExecCGI
FCGIWrapper "C:/server2/php/php-cgi.exe" .php
AllowOverride all
Order allow,deny
Allow from all
Satisfy any
</Directory>
</IfModule>
|
C:/server2/www/ is my docroot |
|
Back to top |
|