linbo
linbo

Reputation: 2431

MySQLdb read timeout

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

Answers (1)

JonnyRo
JonnyRo

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

Related Questions