From 0d71ee69f06d929484e71b01c62e3e18ce4fdcec Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Tue, 25 Jan 2022 12:50:43 +0000 Subject: [PATCH] Revert increased timeout for reporting worker This reverts commit 603acc8b1e338d2f82ca38477d452bd3876db294 + This reverts commit edad1c9a215ef6bb237801e9b383b1c9304e967d. The cause of the slowness was fixed in [1] and since [2] we now have data to prove it: each query to get the data is taking under 5 minutes, so it's safe to lower the timeout again. [1]: https://github.com/alphagov/notifications-api/pull/3417 [2]: https://github.com/alphagov/notifications-api/pull/3437 --- app/config.py | 2 +- manifest.yml.j2 | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/config.py b/app/config.py index 0afc852ed..cffaf2e05 100644 --- a/app/config.py +++ b/app/config.py @@ -145,7 +145,7 @@ class Config(object): SQLALCHEMY_POOL_SIZE = int(os.environ.get('SQLALCHEMY_POOL_SIZE', 5)) SQLALCHEMY_POOL_TIMEOUT = 30 SQLALCHEMY_POOL_RECYCLE = 300 - SQLALCHEMY_STATEMENT_TIMEOUT = int(os.environ.get('SQLALCHEMY_STATEMENT_TIMEOUT', 1200)) + SQLALCHEMY_STATEMENT_TIMEOUT = 1200 PAGE_SIZE = 50 API_PAGE_SIZE = 250 TEST_MESSAGE_FILENAME = 'Test message' diff --git a/manifest.yml.j2 b/manifest.yml.j2 index b8ac8a803..773c0cc50 100644 --- a/manifest.yml.j2 +++ b/manifest.yml.j2 @@ -57,7 +57,6 @@ 'notify-delivery-worker-reporting': { 'additional_env_vars': { 'CELERYD_PREFETCH_MULTIPLIER': 1, - 'SQLALCHEMY_STATEMENT_TIMEOUT': 7200 } }, 'notify-delivery-worker-priority': {},