Fix long running MySQL connections