Apache has got out of control over the past few days and made MySQL crash twice. It all started when I migrated a WordPress website over which also contains a phpBB forum.
I'm not very experienced in server admin so it's been very difficult for me to pinpoint what is causing the issue. When I noticed that MySQL was down, I ran TOP and saw my system-load spike to 98.00. The server runs 10 V-HOSTS all of which receive a healthy amount of traffic so I was obviously seeing many apache-2 processes running.
The high server load continued for 10 mins and then it returned to a normal state. I didn't see a spike of network traffic at this point.
Unfortunately, MySQL error logging was disabled (it's now re-enabled) so no clues there. But I'm pretty sure it is because Apache was consuming all resources, so the MySQL process ID was killed.
My questions are:
Next time this occurs - how can I identify what is causing the system load spike? Could it be a php script that went crazy? Could it be a DDOS attack?
Is there a way of automatically re-starting MySQL when it crashes?
I have now installed htop
. Could this be more useful than top
?
Here my server stats:
m1.xlarge (8 ECUs, 4 vCPUs, 15 GiB memory, 4 x 420 GiB Storage Capacity)
Ubuntu Server 12.04.3 LTS
Comments
Post a Comment