retry SQL connection on failure