close connection for a long query #423