I want to close MySQL database connection after 50 sec automatically if queries are taking more than 50 sec? Is there any option in python while making connection or any other solution to do that ?
Asked
Active
Viewed 407 times
0
-
This may give some help : http://stackoverflow.com/questions/2137084/setup-mysql-query-timeout – PaulF Sep 03 '15 at 12:11
-
@PaulF , thanks for the answer . is there any solution in python for this ? – Sunil Garg Sep 03 '15 at 12:18
-
Not sure about Python - I was looking at doing similar in C# & using a separate thread or timer. – PaulF Sep 03 '15 at 13:10
1 Answers
0
Reference site for python database connection
Look Connection in this site they might explained about timeout for query, you can pass an integer which is in seconds

Pradeep
- 105
- 6