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!

Apache Shuts Down after A short Time

Status
Not open for further replies.

BupcGuy

Technical User
Nov 24, 2005
2
CA
Hello

I have just installed Apache and PHP and they seem to be working ok . When i try the test page,the script i am running is
[<?php phpinfo(); ?>]

i get all the info like i should . When i type the page in the browser it opens up properly but as soon as it opens i get a message saying Apache has encountered a problem and needs to close and then after about ten seconds it shuts down. I am not sure if this is a problem with Apache or my computer.It actualy loads for about ten seconds until apache shuts down. Thats what i find strange about all of this. It seems like Apache and PHP are configured properly or the page wouldnt load at all. To me it seems like a problem with apache or my computer.
Please help. Thankyou

Here is some info from the error logs

[Sun Dec 31 13:23:56 2006] [notice] Child 2440: Acquired the start mutex.
[Sun Dec 31 13:23:56 2006] [notice] Child 2440: Starting 250 worker threads.
[Sun Dec 31 13:23:57 2006] [notice] Child 2440: Starting thread to listen on port 80.
[Sun Dec 31 13:34:04 2006] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun Dec 31 13:34:04 2006] [notice] Child 2440: Exit event signaled. Child process is ending.
[Sun Dec 31 13:34:05 2006] [notice] Child 2440: Released the start mutex
[Sun Dec 31 13:34:06 2006] [notice] Child 2440: Waiting for 250 worker threads to exit.
[Sun Dec 31 13:34:06 2006] [notice] Child 2440: All worker threads have exited.
[Sun Dec 31 13:34:06 2006] [notice] Child 2440: Child process is exiting
[Sun Dec 31 13:34:06 2006] [notice] Parent: Child process exited successfully.
[Sun Dec 31 13:49:44 2006] [notice] Apache/2.2.3 (Win32) PHP/5.1.6 configured -- resuming normal operations
[Sun Dec 31 13:49:44 2006] [notice] Server built: Jul 27 2006 16:49:49
[Sun Dec 31 13:49:44 2006] [notice] Parent: Created child process 2988
[Sun Dec 31 13:49:44 2006] [notice] Child 2988: Child process is running
[Sun Dec 31 13:49:44 2006] [notice] Child 2988: Acquired the start mutex.
[Sun Dec 31 13:49:44 2006] [notice] Child 2988: Starting 250 worker threads.
[Sun Dec 31 13:49:44 2006] [notice] Child 2988: Starting thread to listen on port 80.
[Sun Dec 31 13:50:16 2006] [error] [client 127.0.0.1] script 'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/test.php' not found or unable to stat
[Sun Dec 31 13:58:41 2006] [error] [client 127.0.0.1] PHP Fatal error: Nesting level too deep - recursive dependency? in Unknown on line 0, referer: [Sun Dec 31 13:58:41 2006] [error] [client 127.0.0.1] PHP Fatal error: Nesting level too deep - recursive dependency? in Unknown on line 0, referer: [Sun Dec 31 13:59:07 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sun Dec 31 13:59:07 2006] [notice] Apache/2.2.3 (Win32) PHP/5.1.6 configured -- resuming normal operations
[Sun Dec 31 13:59:07 2006] [notice] Server built: Jul 27 2006 16:49:49
[Sun Dec 31 13:59:07 2006] [notice] Parent: Created child process 1564
[Sun Dec 31 13:59:07 2006] [notice] Child 1564: Child process is running
[Sun Dec 31 13:59:07 2006] [notice] Child 1564: Acquired the start mutex.
[Sun Dec 31 13:59:07 2006] [notice] Child 1564: Starting 250 worker threads.
[Sun Dec 31 13:59:07 2006] [notice] Child 1564: Starting thread to listen on port 80.
[Sun Dec 31 15:31:51 2006] [error] [client 127.0.0.1] PHP Fatal error: Nesting level too deep - recursive dependency? in Unknown on line 0, referer: [Sun Dec 31 15:31:51 2006] [error] [client 127.0.0.1] PHP Fatal error: Nesting level too deep - recursive dependency? in Unknown on line 0, referer: [Sun Dec 31 15:33:07 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sun Dec 31 15:33:07 2006] [notice] Apache/2.2.3 (Win32) PHP/5.1.6 configured -- resuming normal operations
[Sun Dec 31 15:33:07 2006] [notice] Server built: Jul 27 2006 16:49:49
[Sun Dec 31 15:33:07 2006] [notice] Parent: Created child process 2620
[Sun Dec 31 15:33:07 2006] [notice] Child 2620: Child process is running
[Sun Dec 31 15:33:07 2006] [notice] Child 2620: Acquired the start mutex.
[Sun Dec 31 15:33:07 2006] [notice] Child 2620: Starting 250 worker threads.
[Sun Dec 31 15:33:07 2006] [notice] Child 2620: Starting thread to listen on port 80.
[Sun Dec 31 15:33:09 2006] [error] [client 127.0.0.1] PHP Strict Standards: phpinfo() [<a href='function.phpinfo'>function.phpinfo</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\test.php on line 3
[Sun Dec 31 15:38:15 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sun Dec 31 15:38:15 2006] [notice] Apache/2.2.3 (Win32) PHP/5.1.6 configured -- resuming normal operations
[Sun Dec 31 15:38:15 2006] [notice] Server built: Jul 27 2006 16:49:49
[Sun Dec 31 15:38:15 2006] [notice] Parent: Created child process 3908
[Sun Dec 31 15:38:15 2006] [notice] Child 3908: Child process is running
[Sun Dec 31 15:38:15 2006] [notice] Child 3908: Acquired the start mutex.
[Sun Dec 31 15:38:15 2006] [notice] Child 3908: Starting 250 worker threads.
[Sun Dec 31 15:38:15 2006] [notice] Child 3908: Starting thread to listen on port 80.
 
Let's cut down on those "worker threads" and see what happens. In your httpd.conf file you should find a directive that looks something like this:

Code:
<IfModule mpm_winnt.c>
ThreadsPerChild (some number)
MaxRequestsPerChild (some number)
</IfModule>

Change ThreadsPerChild to 150 and MaxRequestsPerChild to 0 and see if that does anything. I may be you have too many things running in windows to be able to reserve that much memory. If you keep dropping it from 150 down to about 50 and it starts working, then you know you have to loosen up some memory or find another box for apache. Another option is to keep the number of child processes low. On a server with a light load, this ain't a very bad thing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top