An example of solving the problem of irregular hanging of Apache server

Source: Internet
Author: User
Keywords Fault Apache

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Round Dudu selected host collocation is Windows 2003 Server+apache+php+mysql, when the website preliminary on-line test, I encountered many problems in the host Operation Dimension, here first said a relatively rare, but also let me have a headache for several days of problem, That's Apache. After an unscheduled period of time, it automatically stops, and the Windows system log shows that the Apache2 service stopped because of a 1 (0x1) serviceability error. The final contents of the Apache error log are 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, in addition to the SSL warning, in the beginning is confused about the situation, that is, the SSL configuration has a problem, the SSL configuration, but after configuration, is not prompted "session Cache are not configured", but the fault is still, I went on to look for clues from the Apache error log, this time I used the keyword "maxconnectionsperchild", this configuration may not know what many people, This is APACHE2.4 to this, originally called Maxrequestsperchild, meaning is the maximum number of connections to the child process, when the setting value, Apache will end the current subprocess, free memory, and then open a new subprocess, this setting is in the httpd-mpm.conf inside, because Is running in the Windows environment, so right on is Winnt MPM, the original setting is:

Threadsperchild 250

Maxconnectionsperchild 10000

All said in order to prevent memory overflow, maxconnectionsperchild do not set to 0, but can be considered as a small number, so I set to 500, continue to test, but no matter how much I change, Apache still not timed to hang, according to the online methods I have tried all over, Finally did not solve this problem, I have moved to reset the system again the idea ...

In the process of solving this problem, I found that the system runs very very slowly, open Task Manager to see, the memory actually accounted for more than 3G, only to find that in fact, Apache actually did not end the process, memory has been occupied and did not get translated, I seem to have been a point of inspiration, It doesn't seem to have much to do with maxconnectionsperchild settings, but what happens when Apache tries to shut down the current subprocess and then reopen the new subprocess after the number of threads that are qualified by the child process? I opened the Windows Log Viewer again, and finally found a log in the application log that was also generated with Apache error, which is "the description of the event ID (487) (Zend optimizer+) cannot be found." "Based on this, I continue to search the web for relevant content about this error log, but it is a pity that all the solutions I have tried, still no fruit, and finally I simply put the Zend off, the specific approach is to open the php.ini, the following two lines commented out, the problem finally resolved ....

[Zend]

zend_extension= "D:phpextzendoptimizer.dll"

So Apache can finally run normally.

This article by the round Dudu: http://www.yuandudu.com original offer, copyright, reprint Please specify, thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.