From 85753084f77ccf1cd7af5b5671a7530686ca281b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 26 Jan 2023 09:43:53 +1300 Subject: [PATCH] Increase timeout on imap About once a day we get an error because the imap server takes longer than the 5 second timeout. This would be largely invisible to most sites as it would cause a run of fetch_bounces to fail quietly & then the next one would probably work. For us the impact is we get notified. I think the impact of increasing to 15 seconds is small enough we don't need to make it configurable and I doubt that we hit this timeout any more than anyone else (our imap is within our own network which is surely more reliably fast than gmail) so the main impact is that people's fetch_bounces jobs are likely to result in data getting into civi with less failed runs & hence a bit quicker --- CRM/Mailing/MailStore/Imap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Mailing/MailStore/Imap.php b/CRM/Mailing/MailStore/Imap.php index 718dc8c067..ec1149d8d5 100644 --- a/CRM/Mailing/MailStore/Imap.php +++ b/CRM/Mailing/MailStore/Imap.php @@ -68,6 +68,8 @@ class CRM_Mailing_MailStore_Imap extends CRM_Mailing_MailStore { 'listLimit' => defined('MAIL_BATCH_SIZE') ? MAIL_BATCH_SIZE : 1000, 'ssl' => $ssl, 'uidReferencing' => TRUE, + // A timeout of 15 prevents the fetch_bounces job from failing if the response is a bit slow. + 'timeout' => 15, ]; $this->_transport = new ezcMailImapTransport($host, NULL, $options); if ($useXOAUTH2) { -- 2.25.1