Reputation: 2431
Any one use MySQLdb and encounter read timeout issue and how to resolve it?
Check the MySQLdb project, saw a patch already applied, but no document mentioned this, how to enable this option?
Upvotes: 0
Views: 1424
Reputation: 1894
Try
import MySQLdb
db=MySQLdb.connect(...other options...,read_timeout=60)
where 60 is the number of seconds for the read timeout.
Upvotes: 2