Out Of Memory


One of my VPS servers (with Digital Ocean) keeps crashing. It's only running a basic wordpress site.

I keep getting: error establishing a database connection

The VPS has 2gb | 2 core | 40gb | 3TB which should be more than enough.

I have SSH into the server and i can see that 1.8gb of memory is currently being used, but i have not way of finding out what is consuming all of this memory.

I have tried installing a few Wordpress plugins to run reports, but it only shows that it's using 15mb.

Can anyone offer any advice... thanks in advance for your help.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

joolsSenior Systems AdministratorCommented:
Is wordpress up to date? there has been a number of exploits released recently.

What plugins are you currently using, are they all up to date too?

if you can get the ssh access you should be able to use ps -aux to get process stats.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oo7mlAuthor Commented:
Yes, everything is update to date.

I am only using 6 plugins:

- contact form 7
- all in one seo pack
- visual composer
- sitemap
- google analytics dashboard
- admin menu editor
joolsSenior Systems AdministratorCommented:
and the ps -aux?
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Anthony PerkinsCommented:
Has this question got anything to do with MS SQL Server?
oo7mlAuthor Commented:
@perkins: "error establishing a database connection"
joolsSenior Systems AdministratorCommented:
I thought the combination of Apache, Wordpress and MS SQL was strange, I thought the asker probably meant MySQL.

You need to be checking the logs for the database and making sure its up and running (ps -aux will show that).

If it was running and the database is on the same server then you might need to check the kernel settings if you are able but checking all the logs should be your first thing.
oo7mlAuthor Commented:
Thanks Jools, i'll do that today and report back, thank you.
William NettmannPHP Web DeveloperCommented:
My guess would be that 2GB of RAM is a little tight for SQL Server. I am in the painful position of needing a MS Sql database accessible to a WordPress site, so I run them on a Windoze server. It has 8GB of RAM - was 4, but I soon found I had to upgrade it.
Can you share on what linux distribution you run your server.
First we need to identify where memory leaks, then we can proceed with a fix.
Looking at chat above through my crystal ball I would say php inside apache consumes too much of RAm and mysqld crashes should be observable via "dmesg". There is a way out of that, just that we need to confirm that my crystal ball is functional.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.