-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary close permanently stops mysql access #164
Comments
I'd go look at the error log for your system. If an application stops, it is usually some grave error that happens in the application. They are not supposed to stop like that. If your application depends critically on emysql being up, you should perhaps start it as a permanent application:
which would have killed your node once emysql fails. |
Thanks for the response. I've updated the app so emysql is permanent. I'll let you know if I'm able to dig up more. Thanks, On 01/05/15 12:54, Jesper Louis Andersen wrote:
|
No, it still ended. 3 hours after starting. It always seems to stop at about the same time after the app starts. Is there a way to check if the connection is closed via emysql so I can force the gen_server to restart? Thanks
|
Hi,
So, I've been running an app I wrote for some time, and this app breaks via emysql. After a number of hours of running, I get this in the erlang logs:
Once this happens, no more writes to mysql occur and the app essentially breaks. I have a gen_server which creates the mysql pool in its init function, and looks something like this:
Then, in each handle_info function, I do a simple emysql stored procedure call, like:
Is there a way to force the mysql connection to reopen on close or to at least discover if the connection is closed so I can force the gen_server to kill itself abnormally?
Thanks,
Lee
The text was updated successfully, but these errors were encountered: