I think the best solution is the one included in this mysqldb patch. The reconnection is handled directly in the mysql C api with an option.
The problem Is that this option is only available from mysql 5.0.x
http://sourceforge.net/tracker/index.php?func=detail&aid=1483074&group_id=22307&atid=374934
Other problem this patch is for mysqldb 1.2.1p2 which has problems with unicode.
Have to...
2006-12-10 20:56:09 UTC in SQLObject