Release db connections after each callback.

Releases db connections after each callback is called so that a small number of db connections can be shared by a larger number of websocket connections.