From 2b06e810c57f0fa970f2bc747efc93160078f4c2 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Mon, 29 Jul 2019 17:23:22 +0100 Subject: [PATCH] Lower the max dvla zip size from 500mb to 40mb There's a bug in pysftp that appears to cause quadratic performance loss. See https://github.com/paramiko/paramiko/issues/1141 for more details. As a temporary band-aid fix, lower the size of the files we're sending. --- app/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index 25117ca07..d167c7e49 100644 --- a/app/config.py +++ b/app/config.py @@ -132,7 +132,8 @@ class Config(object): ONE_OFF_MESSAGE_FILENAME = 'Report' MAX_VERIFY_CODE_COUNT = 10 - MAX_LETTER_PDF_ZIP_FILESIZE = 500 * 1024 * 1024 # 500mb + # be careful increasing this size without being sure that we won't see slowness in pysftp + MAX_LETTER_PDF_ZIP_FILESIZE = 40 * 1024 * 1024 # 40mb MAX_LETTER_PDF_COUNT_PER_ZIP = 500 CHECK_PROXY_HEADER = False