my CPU Usage abnormally high,Getting error establishing connection to database

Posted September 7, 2019 1.1k views
ApacheWordPressUbuntu 18.04Databases

Even though my websites are very limited 2-3 and they are hardly visited by any one still I get, I get this erro establishing connection error on all my database websites, I have checked whether my connection credentials was incorrect but I dint found any thing wrong, also these websites gets started working after every server reset from my dashboard. but it shows same error within 1-2 hrs. plese help.

Also there is abnormally High usage of cpu for just 3 websites with hardly any traffic, please help.

2 gb ram 2 cpu

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

i don’t know about the CPU usage maybe IT IS the fact that you have three website s on them not sure. The error though could be related to your settings in the configuration pages of your sites. You might need to increase the allowed capacity. Now im not sure how you do this or which files they are but im sure you can find this info fairly easy.

Hi @fbssdocuments,

The error you are getting is because your server is being overloaded and it kills services like Apache/Nginx/MySQL. In this instance, your MySQL/MariaDB or whatever you are using was killed by the server.

This means you’ll need to pinpoint the exact source of the issue and fix it.

  • Suggestions

    You mentioned, there is not that much traffic. It’s not necessary down to traffic. There might be an exploit on your website which is being used.

    Web Server

    You might be getting a lot of POST request to a login form. This can be checked in your web server’s access logs.

    ** MySQL **

    There might be a bug in your website which if called generates a lot of queries. Imagine someone doing a little script to call this page every second, it will tear your server down. To check that, I’ll recommend this

    Enter your MySQL

    show full processlist;

    It will show you all your queries.You might get some information there.