- changed status to invalid
spend 15 minutes for 'Lost connect to MySQL server during query'
Issue #2693
resolved
Hello, My sqlalchemy version is 0.7.8-1. DB lost connection When I connect to MySQL DB, and spend 15 minutes to wait the response. Is there any solution for shortened time? Thanks.
Comments (1)
-
repo owner - Log in to comment
for connection timeouts, take a look at connect_timeout here: http://mysql-python.sourceforge.net/MySQLdb.html#functions-and-attributes which can be applied to create_engine as
create_engine('mysql+mysqldb://user:pass@host/db?connect_timeout=30')
.for query timeouts, MySQL doesn't seem to have a good option. the recipe I found is http://stackoverflow.com/questions/2137084/setup-mysql-query-timeout. good luck !