Error establishing a database connection

3 posts / 0 new
Last post
#1 Sun, 05/27/2012 - 06:40
matley

Error establishing a database connection

Can anyone help me fix an issue I'm having with MySQL periodically shutting down? When I try to restart the daemon, the error I get is:

Failed to start service :

MySQL Daemon failed to start.

Starting mysqld: [FAILED]

If I restart the whole server it works fine, but this is happening on a daily basis so I can't keep restarting the server. I probably need to check the logs but can someone direct me to the right place to look?

Thanks, Dan

Mon, 05/28/2012 - 09:17
andreychek

Hi Dan,

Hmm, MySQL definitely shouldn't be shutting down daily (or at all!)

Are you by chance using a VPS? What you're describing may suggest a resource problem, we've seen that happen a lot with OpenVZ-based VPS's.

If you have a /proc/user_beancounters file, could you paste in it's contents?

Also, what does "free -m" show?

Thanks!

-Eric

Tue, 05/29/2012 - 15:09
matley

Thanks for the help. I think you could be right, I'm currently using AWS EC2 Micro instance which is only 595MB RAM. I don't see a beancounters file but running 'free -m' displays:

Mem: 595 (total) 500 (used) 95 (free) 0 (shared) 28 (buffers) 177 (cached)

-/+ buffers: 294 (used) 300 (free)

Not much RAM remaining. Can you suggest how I can reduce the RAM usage as increasing RAM through AWS is mighty expensive.

Thanks, Dan

Topic locked