I'm getting this error when I'm trying to connect to a mysql database. The problem is that the application works for weeks, and then randomly I get this message. When I get this error message the application is not able to reconnect to the database until I restart it.
I'm using a configuration file to connect to the database, and the adapter is specified...the database configuration is not generated at runtime.
Do you have any idea on what is going on?
when I tried to run a command line script (let's say 'my_script' here), the same error happened. The reasons were:
So, the following is the solution in my case:
$ RAILS_ENV=production my_script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With