Return Gateway Timeout instead of Request Timeout for database timeout
Closes #14945 (grafted from ae46da1d0ab434dda58b54070e1faa2a72974935) --HG-- branch : 8.0
This commit is contained in:
1 parent
755b173a77
commit
e28e1ead48
1 file changed
+1
-1
@@ -251,7 +251,7 @@ def _dispatch(request, pool, *args, **kwargs):
|
||||
except backend.DatabaseTimeoutError:
|
||||
logger.warning(
|
||||
log_message, *log_args, duration(), exc_info=True)
|
||||
abort(HTTPStatus.REQUEST_TIMEOUT)
|
||||
abort(HTTPStatus.GATEWAY_TIMEOUT)
|
||||
except backend.DatabaseOperationalError:
|
||||
if count < retry and not rpc.readonly:
|
||||
transaction.rollback()
|
||||
|
||||
Reference in new issue
Block a user