http://www.openldap.org/lists/openldap-technical/201009/msg00070.html
While googling for reconnect in the ODBC API I found this: http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connecti...
option 4194304: Enables auto-reconnection functionality. It seems like it fixes my problem.