Error establ. Database Connection - happening over again

Hi

so I have this (interesting) problem, that each 4-5 days, this error occurs:

Error establishing Database Connection.

My fix is, that I reboot the whole server.

However, that cannot be a comprehensive solution I’d say….

One of my sites gets quite some traffic (40gb in 1 week);

I have a AWS lightsail plan (4 GB RAM) and thought that it might comes from being underequipped (?)

What would you do in this case?

I’ve seen this issue before, and it was due to not enough memory. Although it was a Windows Server, when MySQL reached its allocation of memory, the service shut down and needed a restarted.

More about your Hestia setup could help suggest some solutions. is it apache only, nginx, only or both? Are you using MariaDB or MYSQL? Are you using any caching?

1 Like

It is always the same step to debug: Check the logs, as @aguilar1181 already wrote, it is probaly an oom issue (out of memory).

1 Like

I am using apache + nginx, and MariaDB.

Also, I use cloudflare.

Nothing suspicious here [added service to firewall]; only a few IP addresses, that were banned.

If it is OOM, how would I get to see that?

If it is OOM, how would I get to see that?

Tweak your server, or look for a bigger spec server :slight_smile: Looking in /var/log/syslog should show OOM errors (search for “OOM”) if I recal. I’ve had it before. Normally its from misconfigured max clients / memory per process / etc)

BTW - Monit is also great for keeping services up

1 Like