Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache child process is restarting |
|
Author |
|
mpiche
Joined: 10 Apr 2008 Posts: 9
|
Posted: Mon 14 Apr '08 20:48 Post subject: Apache child process is restarting |
|
|
Since a couple of months, Apache child process is restarting. At the beginning it only happened 2-3 times a week, but the problem have increase in the last month. Apache is now restarting 2-10 times each day (the more traffic we have, the more often it restarts).
When Apache is restarting, we have the following lines in the error log :
Code: | [Mon Apr 14 13:00:35 2008] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Mon Apr 14 13:00:37 2008] [notice] Apache/2.0.58 (Win32) PHP/5.2.0 mod_ssl/2.0.54 OpenSSL/0.9.8b configured -- resuming normal operations
[Mon Apr 14 13:00:37 2008] [notice] Server built: Apr 29 2006 17:47:10
[Mon Apr 14 13:00:37 2008] [notice] Parent: Created child process 3148
[Mon Apr 14 13:00:37 2008] [notice] Disabled use of AcceptEx() WinSock2 API
[Mon Apr 14 13:00:38 2008] [notice] Child 3148: Child process is running
[Mon Apr 14 13:00:38 2008] [notice] Child 3148: Acquired the start mutex.
[Mon Apr 14 13:00:38 2008] [notice] Child 3148: Starting 250 worker threads.
[Mon Apr 14 13:00:38 2008] [notice] Child 3148: Listening on port 443.
[Mon Apr 14 13:00:38 2008] [notice] Child 3148: Listening on port 80. |
Sometime the status is 2147483655, but it is mostly 3221225477.
Our configuration is :
Windows 2003 Server
Apache/2.0.58 (Win32)
PHP/5.2.0 (Apache module)
mod_ssl/2.0.54 (OpenSSL/0.9.8b)
I have look for an answer on Google and on differents forums, but nothing have solved our problem so far.
Thanks for the help ! |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 14 Apr '08 21:13 Post subject: |
|
|
It's a well known issue and discussed here more. PHP (special its extension modules) is mostly bloating the server when PHP runs as module.
It is advised to try to run php with mod_fcgid (Fastcgi)
There are advantages to running PHP with FCGI. Separating the PHP code from the web server removes 'bloat' from the main server, and improves the performance of non-PHP requests. Secondly, having one permanent PHP process as opposed to one per apache process means that shared resources like persistent MySQL connections are used more efficiently. And maybe even more important is stability, php is not shutting down or restarting Apache anymore.
You can also try upgrading your php to the latest 5.2.5 , this is in the PHP 5.2.4 Change log:
Fixed bug #41713 (Persistent memory consumption on win32 since 5.2). (Dmitry)
Steffen |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 14 Apr '08 21:23 Post subject: |
|
|
Oops.., overlooked. I see you run a legacy/old Apache/2.0.58 , we have not anymore mod_fcgid available for Apache 2.0.X
Steffen |
|
Back to top |
|
mpiche
Joined: 10 Apr 2008 Posts: 9
|
Posted: Mon 14 Apr '08 22:02 Post subject: |
|
|
We will upgrade the server in a couple of weeks and try mod_fcgid. I hope this will solve the problem.
Thank you. |
|
Back to top |
|
mpiche
Joined: 10 Apr 2008 Posts: 9
|
Posted: Wed 16 Apr '08 20:44 Post subject: |
|
|
Like your advice, we are currently testing FastCGI on our developpement server.
The developpement configuration is :
Windows 2003 Server
Apache 2.2.8 from ApacheLounge with mod_ssl/2.2.8 OpenSSL/0.9.8g
PHP 5.2.5 (mod_fcgid)
I've added in my httpd.conf the following lines for FCGI (I have disabled php5_module and enabled mod_fcgid) :
Code: | <IfModule mod_fcgid.c>
IPCCommTimeout 40
IPCConnectTimeout 10
MaxProcessCount 8
OutputBufferSize 64
ProcessLifeTime 240
MaxRequestsPerProcess 500
DefaultInitEnv PHPRC "c:/php/"
DefaultInitEnv PATH "c:/php;C:/Apache2/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/Ora10g/BIN;c:/program files/imagemagick-6.2.5-q16"
DefaultInitEnv SystemRoot "C:/Windows"
DefaultInitEnv SystemDrive "C:"
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
DefaultInitEnv TMP "C:/WINDOWS/TEMP"
DefaultInitEnv windir "C:/WINDOWS"
DefaultInitEnv PHP_FCGI_CHILDREN 4
AddHandler fcgid-script .php
<Directory "D:/htdocs">
Options +ExecCGI
FCGIWrapper "C:/PHP/php-cgi.exe" .php
Order allow,deny
Allow from all
Satisfy any
</Directory>
</IfModule> |
The web pages seem to be working fine, but we have sometime the following errors in the Windows Application Error log :
Reporting queued error: faulting application php-cgi.exe, version 5.2.5.5, faulting module php5ts.dll, version 5.2.5.5, fault address 0x0000abe6.
The fault adress is different each time.
Thanks again for your help ! |
|
Back to top |
|
|
|
|
|
|