I have a Rails application which has a huge database. It uses the gem mysql2
to connect to MySQL
. It was working fine until yesterday. Today when I started the application I am getting these errors while trying to connect to that specific database.
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
ERROR:
Can't connect to the server
Mysql connection is established to other databases well but not to this one database. It was perfectly fine even with this database until yesterday. Why did it change suddenly?
I also checked and made changes as per the answer in this link: MySQL error 2006: mysql server has gone away but I am still getting the same error. How can I rectify this error?