Added sleep to see if it resolves the occasional mysql connect failures