Possible solution to 500 error, problem coming from closed connections on pool