dzagey
By:
dzagey

Sudden Spike in CPU, Disk and Memory Use making my website unreachable

July 24, 2017 353 views
Apache DigitalOcean Load Balancing Security System Tools CentOS

I experience this problem a few times a week where there is a sudden spike in memory, cpu, and disk use that makes my website unreachable till i reboot.

The increase in the resource use stays up for about a minute but permanently blocks access to the website. Could this be a ddos?

Sorry i cant provide more detail unless i could attach a picture of my graphs but i think ive explained it fairly well.

2 Answers

Hi @dzagey

How many times each week? And if it's only a minute, then it sounds more like an update checker running, but that shouldn't block your web server.

What do you mean with "permanently blocks" - every time the spike happens, then your website is down until you do something manually?

Can you check your /var/log/apache2/access.log and /var/log/syslog from the last time the spike happened - do you see excessive website visits or anything strange in syslog?

It would be helpful if you could monitor the server processes while the spike happens.
You can do that with top (or htop if you have that installed).

  • About three times a week.

    Yes the website is down permanently until i do something manually.

    I will check those next time the spike happens.

    • @dzagey

      Okay, if the server crashes totally, so you have to do a forced restart via the control panel, then something is really going wrong.
      And you cannot even get access via the Console in the control panel?
      Which version of CentOS are you using?

      Can you post these three files to www.pastebin.com and link here?

      /var/log/kern.log
      /var/log/lastlog
      /var/log/syslog
      

@dzagey

We cannot help you if you do not provide more info, Can you access your droplet while the website is not reachable?

If you can provide the output of these commands:

top to get an idea of who is using your processor the more.

top -o +%MEM to get an idea of who is using your memory more.

Provide the error log of your web server and database server.

Also what do you exactly mean by UNREACHABLE does it send internal server error response or no response at all?

Thanks.

  • No I cannot access my droplet and have to force restart in digital ocean. So i donot see how i can run t

    top
    

    while that is happening. But ill look into everything else that was suggested next time it occurs.

Have another answer? Share your knowledge.