Answer the question
In order to leave comments, you need to log in
Abnormal load on Apache and MySQL?
Hello.
In general, there is a small server on Ubuntu 14.04 LTS 64 bit, Genuine Intel 2.8 GHz, RAM 1G, 24
GB SSD.
It has a standard set: mysql 5.5.47 + php 5.5.9 + nginx 1.9.11 + apache 2.4.7 + monit + munin.
There are several sites on the server with a total attendance of up to 5-7k per day. Static caching (images, css, js) is configured on all sites + CloudFlare CDN service is used. No third party PHP frameworks/ORMs are used.
Everything seems to work fine, but sometimes there is some kind of abnormal load on Apache and MySQL. At the same time, the total traffic to the server does not grow significantly. At this point, the number of Apache processes, the number of connections to MySQL, the CPU and memory usage are growing sharply. Here are screenshots from the Munin Monitor:
Particularly interesting are the screenshots with the number of Apache processes and the number of MySQL connections. The screenshots also show that at the moment of bursts on the graphs, the number of requests to MySQL does not increase significantly.
In general, I'm already going to move to a more powerful server, but I'm not sure that this will solve the problem. Maybe this is such an attack on Apache?
Thank you.
Answer the question
In order to leave comments, you need to log in
Well, look at the Apache logs at this moment and check which crons are running at this moment
I would look at the apache and nginx logs - it will be clearer where the connections come from, from the same address, to which page, etc. Perhaps it is worth detecting such activity and blocking such unwanted guests for 15 minutes using fail2ban and iptables.
It is possible that the transition from the nginx + apache bundle to the nginx + php-fpm bundle will have a positive effect on performance. (Personal opinion)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question