Windows+APACHE service often troubleshooting method

  
                  

The host matching with the round toot is Windows 2003 Server+Apache+PHP+Mysql. When the website was first tested, I encountered a lot of problems in the operation and maintenance of the host. Here is a rare one, but also let me The problem of headaches for several days is that APACHE automatically stops after running an untimely time. The Windows system log shows that the Apache2 service stopped due to a 1 (0x1) service error. The final content of the APACHE error log is as follows:

[Thu Mar 21 01:08:09.187500 2013] [mpm_winnt:notice] [pid 2988:tid 1696] AH00358: Child: Process exiting because it reached MaxConnectionsPerChild Signaling the parent to restart a new child process.

[Thu Mar 21 01:08:09.203125 2013] [mpm_winnt:notice] [pid 2992:tid 436] AH00424: Parent: Received restart signal -- Restarting The server.

[Thu Mar 21 01:08:11.000000 2013] [ssl:warn] [pid 2992:tid 436] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]

[Thu Mar 21 01:08:11.187500 2013] [mpm_winnt:notice] [pid 2988:tid 1696] AH00364: Child: All worker threads have exited.

Other content seems to be normal except SSL In addition, the warning was unclear at first. I thought that there was a problem with the SSL configuration. I configured the SSL, but after the configuration, I didn’t prompt “Session Cache is not configured”, but the fault still remains, I am Continue to look for clues from APACHE's error log, this time I used The keyword is "MaxConnectionsPerChild", this configuration may not be known to many people, this is APACHE2.4 changed to this, originally called MaxRequestsPerChild, meaning the maximum number of connections of the child process, when the set value is reached, APACHE will end the current child process, release the memory, and then open a new child process, this setting is in the httpd-mpm.conf, because it is running in the Windows environment, so the right is WinNT MPM, the original settings Yes:

ThreadsPerChild 250

MaxConnectionsPerChild 10000

To prevent memory overflow, MaxConnectionsPerChild should not be set to 0, but consider setting a small value, so I set it to 500, continue to test, but no matter how much I changed, APACHE still hangs from time to time, according to the online method I tried all over again, after all, did not solve this problem, I have moved the idea of ​​resetting the system again. ...

In the process of solving this problem, I found that the system is running very very slowly. When I open the task manager, the memory actually accounts for 3 G, I found that APACHE actually did not end the child process, the memory has been occupied and has not been translated, I seem to get some inspiration, it seems that this root and MaxConnectionsPerChild settings are not much contact, but in the child process After the number of threads is limited, what happens when APACHE tries to close the current child process and then restart the new child process to make it fail? I opened the Windows log viewer again and finally found a log in the application log that was generated along with the APACHE error. The content is "The description of the event ID ( 487 ) (in the resource (Zend Optimizer+)) could not be found. & rdquo;, According to this, I continue to search the Internet for the relevant content of this error log, but it is a pity that I have tried all the solutions, still no results, and finally I will turn off zend, the specific method is Open php.ini, comment out the following two lines, the problem is finally solved.....

[zend]

zend_extension="D:\\php\\ext\\ZendOptimizer.dll" ;

This way APACHE can finally run normally.

The host matching of the round toot is Windows 2003 Server+Apache+PHP+Mysql. When the website was first tested, I encountered a lot of problems in the operation and maintenance of the host. Here is a rare one. The problem that also caused me headaches for a few days is that APACHE automatically stops after running an untimely time. The Windows system log shows that the Apache2 service stopped due to a 1 (0x1) service error. The final content of the APACHE error log is as follows:

[Thu Mar 21 01:08:09.187500 2013] [mpm_winnt:notice] [pid 2988:tid 1696] AH00358: Child: Process exiting because it reached MaxConnectionsPerChild Signaling the parent to restart a new child process.[Thu Mar 21 01:08:09.203125 2013] [mpm_winnt:notice] [pid 2992:tid 436] AH00424: Parent: Received restart signal -- Restarting the server.[Thu Mar 21 01:08:11.000000 2013] [ssl:warn] [pid 2992:tid 436] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache][Thu Mar 21 01:08:11.187500 2013] [mpm_winnt:notice] [pid 2988:tid 1696] AH00364: Child: All worker threads have exited.

Other content seems to be normal, except for the warning of SSL, it is unclear at first, thinking that there is a problem with the SSL configuration. SSL is configured, but after configuration, it is not prompted "Session Cache is not configured", but the fault remains, I continue to look for clues from the APACHE error log, this time I used the keyword Yes “MaxCo nnectionsPerChild”, this configuration may not be known to many people, this is APACHE2.4 changed to this, originally called MaxRequestsPerChild, meaning the maximum number of connections of the child process, when the set value is reached, APACHE will end the current The child process, release the memory, and then open the new child process, this setting is in the httpd-mpm.conf, because it is running in the Windows environment, so it is WinNT MPM, the original settings are:

ThreadsPerChild 250

MaxConnectionsPerChild 10000

In order to prevent memory overflow, MaxConnectionsPerChild should not be set to 0, but you can consider setting it to a small value, so I set it to 500 and continue testing. But no matter how much I changed, APACHE still hangs from time to time. I tried it all according to the online method. After all, I didn't solve this problem. I moved the idea of ​​resetting the system again...

In the process of solving this problem, I found that the system is running very very slowly. When I open the task manager, the memory actually accounts for more than 3G, only to find the AP. ACHE doesn't actually end the child process. The memory has been occupied and has not been translated. I seem to get some inspiration. It seems that this is not much related to the setting of MaxConnectionsPerChild, but after reaching the number of threads defined by the child process. What happened when APACHE tried to close the current child process and re-open the new child process to make it fail? I opened the Windows log viewer again and finally found a log in the application log that was generated along with the APACHE error. The content is "The description of the event ID ( 487 ) (in the resource (Zend Optimizer+)) could not be found. & rdquo;, According to this, I continue to search the Internet for the relevant content of this error log, but it is a pity that I have tried all the solutions, still no results, and finally I will turn off zend, the specific method is Open php.ini, comment out the following two lines, the problem is finally solved.....

[zend]zend_extension="D:\\php\\ext\\ZendOptimizer.dll"

This way APACHE can finally run normally.

Copyright © Windows knowledge All Rights Reserved