0

This is the second time in a week that this has happened. Suddenly our nodejs app starts freaking out because it can't make a connection to the database reporting this error:

Error: connect EAGAIN /var/run/mysqld/mysqld.sock

When I try to access from the command line 'mysql -u -p' I get the same error.

When trying to run 'service mysql restart' I get the following error:

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.

Unfortunately those commands don't shed any light on why it is failing. It's odd because it will be running just fine and then suddenly enter this state. Last time it happened I had to craft a pretty elaborate script just to get it cleaned up so that I could do a fresh install again. Obviously that is not a good solution to the problem but I was hoping it was going to be an isolated incident.

It is worth noting that I am running this on a Raspberry Pi.

Any thoughts on how to debug + prevent from happening again?

1 Answer 1

1

First two things that comes to my mind :

  • Low space disk on the SD card
  • Low memory

Did you check both ?

1
  • SD card space is good but you are right, ram is fairly low - only 150mb free. Rebooting actually fixed it this time.
    – niczak
    Jan 31, 2017 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .