-
Notifications
You must be signed in to change notification settings - Fork 36
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
App losing DB credentials #55
Comments
Sorry for the slow reply here. This is, indeed, weird. I can't see why it would be "losing" the credentials. I take it the username in the "Access denied for user..." message was the correct username it should have been using? Do you still have this issue? Was it with the latest Dancer::Plugin::Database version on CPAN? |
Thanks a lot for your reply. Now, I think I have solved the issue (hopefully) and this might help narrow down the cause. The connection was over tcp to localhost on standard port. I've switched to unix socket and haven't seen the problem again since. I'm starting to think that this is not a problem with this plugin but a TCP issue, maybe a timeout, and a mysql driver reporting an incorrect error message. |
Please do let me know if you see the problem again now you've switched to Unix sockets. I certainly haven't seen this kind of problem in my use of D::P::D in production apps. If it happens again, maybe a If not - probably close this issue, agree? |
Funny you just replied now. The app went down yesterday again, same access denied error even using sockets. |
Ah - are you using |
I installed an application based on Dancer using the Dancer::Plugin::Database module at the beginning of the week and notice that the connection to the mysql DB got lost after a few days of running.
Logs report crashed: DBI connect('database=xxxxx','xxxxx',...) failed: Access denied for user 'xxx'@'localhost' (using password: YES)
The authentication method is user/password and they are of course correct. Mysql was fine at the time the application was crashing and I could connect with mysql client using the application credentials.
Restarting the application solved the problem.
The application is deployed with plask:
sudo -u www-data /usr/local/bin/plackup -E production -s Starman --workers=1 -l /tmp/plack.sock -a bin/app.pl &
I am using the Dancer::Plugin::Database plugin with connection_check_threshold: 10
What could cause an access denied ? According to mysql doc, this message means wrong password. Could the in-memory password just get lost ? Weird.
The text was updated successfully, but these errors were encountered: