Database mysqld process has been repeatedly killed, really just the problem of MySQL?

Source: Internet
Author: User
Tags system log

Once on my blog server found such a problem, every few days the MySQL service process will be inexplicably disappeared. The problem lasted a very long time, and it took me half a month to do it, because every time a problem occurred, it was a few days after the normal operation.

I realized that there might be a problem with my MySQL database. Use putty to connect to my server, use the top command, and then press the SHIFT+M key in memory size to see the mysqld process. Open the System log file (Cat/var/log/mysqld.log), found in the afternoon when the memory alarm occurred, then the system killed the largest memory of the MySQL process, to alleviate the server pressure.

Restart the MySQL process and use the top command to stare at what has changed in the list of processes on the server. 10 minutes or so, abnormal appearance, a lot of httpd process came out. And each process occupies about 2%-3% of the memory, until MySQL was killed again, the server was launched on the httpd process has reached more than 30, about 80% of the memory, plus mysqld occupy about 20%, almost no memory can be allocated. The original problem appeared on Apache.


Talk about how Apache works here. Apache has two modes of operation, one is Prefork mode and the other is worker mode. Each of these two modes has its advantages, and each connection in Prefork mode creates a process, one-to-one. Worker mode a process that corresponds to multiple connections, using threads for processing, many-to-one.
However, it is cumbersome and unsafe to modify Apache's working mode. Modification is not advocated. Or honestly optimize the prefork mode.

Database mysqld process has been repeatedly killed, really just the problem of MySQL?

Related Article

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.