workaround rare http 504 errors