Fixing "The wait operation timed out" SQL error