Detecting MYSQL running status

27 views
Skip to first unread message

Raj Chinna

unread,
Dec 19, 2013, 1:35:24 AM12/19/13
to web...@googlegroups.com
Hi,

I have web2py application which talks with MYSQL and i have my db connection strings in db.py module. Sometime the web2py server is running without any issues, but mysql goes offline now and then. So, I am getting the ticket generated saying that "Failure to connect, tried 5 times: Traceback (most recent call last): ".

All I wanted to do is to check if this error comes out (that's mysql is not running) I need to redirect the user to something like 404/database error page. Can someone tell me where and how can I detect this database connectivity failure and show some meaningful error message. 

Thanks, 
Raj Chinna

Paolo Valleri

unread,
Dec 19, 2013, 9:17:00 AM12/19/13
to web...@googlegroups.com
I've the same problem, I don't think DAL has this kind of ability but I leave the word to others in such cases.
Are you interested in showing the 404 page for all tickets or only for those the involve the db connection?

Paolo

Raj Chinna

unread,
Dec 23, 2013, 9:23:50 AM12/23/13
to web...@googlegroups.com
Paolo,

Thanks for the response. 

I just put 404 for as an example, I am may end up showing a page which asks the end user to contact the System Admin to fix the issue. What am doing is an webapp for a enterprise task. So, I may show few details about the issue.
Reply all
Reply to author
Forward
0 new messages