mysql connection error results in 500