MySQL does not allow more than 1023 open transactions