Vasiliy Pechen - 2008-03-21

The problem with the loss of connection to the database after a certain time. Reconnect is used but it doesn't work.
Subsequent connections issued an error "Mysql server has gone away." That was discovered with an idle database connection on FreeBSD 6.2 and 7.0. Such problems dosn't exist on Gentoo. Connection had been idle during the week and I think it would stay longer. On FreeBSD from 2-3 hours and fewer days.

I use pool of connections, and wrap it in lockers that should not allow to execute queries in other threads.

Patch was used:
http://patches.ubuntu.com/by-release/extracted/debian/p/python-mysqldb/1.2.2-5/05_null-connection-guard.dpatch

The same machines were used for freebsd and gentoo with mysql 5.0.41.
We need to make it work correctly on freebsd.