With Zend Framework 2 (ZF 2), this solution could be written as:

$adapter->getDriver()->getConnection()->disconnect();
$adapter->getDriver()->getConnection()->connect();

I wish long running processes that tend to cause this would not run long. Now I waited like ten minutes so see if this solutions would work, and it doesn't. At least, not for me.