A
A
AndreyBerezov2017-01-24 11:28:01
Apache HTTP Server
AndreyBerezov, 2017-01-24 11:28:01

How to find out why the sudden load on the server?

Good afternoon, dear colleagues!
The project is running a server. In the normal state, the processor load fluctuates around 8-10% (we took it with a margin). Attendance of the project is still small and at the same time there are no more than 1000 people on the site. Suddenly, the load suddenly increases to 100% on all 8 cores. To be treated by multiple (up to 5 times) restarting Apache2. This happens once a day, at different times. Sometimes there are 300 people on the site, sometimes 1000. But this is not normal. I am not asking you to perform miracles of telepathy and speculate on very scarce information. Tell me, please, where to look? I have little experience, so I don’t understand where to start at all.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander, 2017-01-25
@AndreyBerezov

I would also advise at least hiding Apache behind Nginx

A
Alexander Karabanov, 2017-01-24
@karabanov

Start with this How to understand what is happening on the server .

E
Eugene Wolf, 2017-01-24
@Wolfnsex

Tell me, please, where to look? I have little experience, so I don’t understand where to start at all.

1. View traffic
2. View the list of Apache processes Apache
, if configured incorrectly, can sometimes do wonders :) Are there any large files? Apache version?
PS Tritely run top and see what the processor is loading, how many of these processes, etc. Apache may be the "entrance" to the problem, but it's the source.

R
Roman Sokolov, 2017-01-24
@jimquery

access.log look. Maybe they are attacking the server, or maybe just some crooked php script is being executed.
try disabling awstat if used.
There may also be a bug in cms. You need to check the version and its known problems.
While the CPU is booting, use the top command on the server to see which process is loading the system. You can start with this.

V
Viktor Taran, 2017-01-24
@shambler81

1. What loads io
as a rule is already here and your answer will be.
2. htop - what about loading the processor.
3. Che on memory loading.
4. mytop - or graphs in phpmyadmin - they are there.
Look at the hanging transactions, if they exist, then this database is already slowing down.
5. Run html - see the speed of building the model house
6. run the php script, the speed of the model house
7. initialize the core , speed
8. footer + header + core , speed
9. connect the directory compare.
In 99% of cases this is enough.
ps. I hope you have php precache enabled, which engine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question