Our CPU usage showing 99% since last 24 hours due to this usage we can't able to connect the server through SSH. We are using this server for our Magento 2.0 webstore.

We have rebooted the server lots of time but after rebooting the server same CPU usage in few secs. So, we can't able to trace the server error or server error log as well.

Can anyone please suggest how we can fix this issue?

Server Information:

OS: Ubuntu

Web Server: Apache

Zone: europe-west1-c

Machine Type: 1 vCPU, 3.75 GB


Rinjal Patel

  • 1
    For starters you could look for processes with the highest CPU usage. – cstamas Jul 30 '16 at 9:31
  • 1
    What makes you believe the "Zone: europe-west1-c" information is relevant to the issue? How do you get the CPU usage information? Did you try rebooting in single-user mode ? – jlliagre Jul 30 '16 at 13:13

Try to login to your server via VPS control panel provided by your hosting provider and login to SSH via Console. You will able to login and can track logs to figure it out the issue.


If you have console access

Treat it like a normal server and use grub to boot into single user mode to fix the problem.

This might work if you don't have console access

I have no idea what provider or technology you are using but there is a technique described by Amazon for AWS EC2 unresponsive servers


My understanding after skimming it is

  1. Create a new temporary virtual machine
  2. Shut down the unresponsive virtual machine
  3. Attach the unresponsive virtual machine's drive to the new machine
  4. Fix the problem and shut down
  5. Detach the drive and reattach to the original machine, then boot it

With such a high CPU load, the problem is, I guess, is even working interactively in bash. But you can send a single command via ssh like that:

ssh user@host command

This approach can help you to start investigation. Get most CPU consuming processes:

ssh user@host ps aux --sort=-pcpu

You'll get list of all processes sorted by CPU consumption. If some downtime is acceptable and you have root login, then you can try to kill all that processes. If it is apache, for example:

ssh root@host killall -9 apache

Note that apache here is name of process showed by ps. You can have something like apache2 or something like that.

Then, when processes are killed and you are able to login on server you can try to investigate issue with logs, reconfigure apache to handle less clients, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.