Linux Apache error log hint [warn] child process 7751 still do not exit, sending a SIGTERM

Source: Internet
Author: User
Tags apache error log

Apache eats empty memory, frequent downtime

In the deployment of a set of intranet test environment, frequent downtime, after the boot constantly eat memory, restart Apache after the memory consumption will continue to rise, until the swap runs out, until the crash, due to the intranet environment, the server concurrency and pressure are very small.

Check the Apache error log for a number of similar errors:

[Tue Feb 14 14:49:28 2012] [Warn] child process 7751 still do not exit, sending a SIGTERM

[Tue Feb 14 14:49:30 2012] [ERROR] Child process 7603 still does not exit, sending a SIGKILL

[Tue Feb 14 14:49:30 2012] [ERROR] Child process 7614 still does not exit, sending a SIGKILL

This is because PHP has some script that has a memory leak code snippet. The number of processing requests for the process in which Apache processes these snippets is set to infinity. This means that these processes will only be killed if the Apache restarts (Stop-start mode) or the server restarts, otherwise it will run until the last resource of the system (mainly memory) is exhausted.

Problem Analysis:

Maximum number of processes allowed to be configured by the server

Serverlimit 1500

Sets the number of child processes that are established when the server starts. Because the number of child processes dynamically depends on the weight of the load, it is generally not necessary to adjust this parameter.

Startservers 5

Minspareservers: Sets the minimum number of idle child processes. The so-called idle child process refers to a child process that is not processing the request. If the number of currently idle child processes is less than minspareservers, then Apache will produce a new subprocess at a maximum speed of one second.

Minspareservers 5

Sets the maximum number of idle child processes. If there are currently more than maxspareservers of idle child processes, the parent process kills the extra child processes.

Maxspareservers 10

Maximum number of Access requests (maximum number of threads) for client requests.

MaxClients 1500

Set the maximum number of requests that each child process is allowed to provide during its lifetime

Maxrequestsperchild 50

Problem Solving:

Set Maxrequestsperchild 50 or 30

Maxrequestsperchild can not be too large, nor set to 0, preferably set to a relatively small number, 100 may be enough to prevent the httpd process has an unexpected memory leak.


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.