I use doctrine 2 PDO with mysql.
When stress testing the server, mysql reports a lot of aborted connections (up-to 20%).
I am trying to locate the issue.
I have the same problem and
$entityManager->getConnection()->close();
seems to work, but works 'better' in some php versions if you add
gc_collect_cycles()
after closing connections. I'm still having that kind of issues in older php version, may be something related with the garbage collector I guess. Will keep you updated if I find a final solution for all php versions