How to set db timeout in webpy
And how you usually do when db timeout in webpy ?
Assuming you're talking about a MySQL DB...
Mysql connector has connection_timeout parameter [1].
And web.py's MySQL class[2] uses **keywords in his definition, maybe you could use connection_timeout.
At least I've tried here and my connection works. I've just couldn't wait to see if it drops when time expires.
[1] - http://dev.mysql.com/doc/refman/5.7/en/connector-python-connectargs.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.