In the EspoCRM log, I've noticed recently an increasing number of laminas-mail IMAP protocol errors that occur at random times. I used to see one or two of these errors per month but now they're coming up many times a day.
I've tried increasing the connection timeout parameter in Imap.php from 30 seconds to 120 seconds with no improvement.
I only check personal email accounts (group emails not in use) and it's a simple system with only 2 mail accounts. Clicking the connection test button for IMAP mail always returns a 'connection is OK' message and no errors are generated in the log.
A typical error log looks like this (though there could be many more errors):-
[2024-04-23 02:04:02] ERROR: JobManager: Failed job running, job '6627156d4f2f02fa1'. Job CheckEmailAccounts 6317592f6a7d0c771: [0] cannot read - connection closed? /var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php:143; at /var/www/html/espocrm/application/Espo/Classes/Jobs/CheckEmailAccounts.php:61.
[2024-04-23 03:39:22] WARNING: E_WARNING: fgets(): SSL: Connection reset by peer {"code":2,"message":"fgets(): SSL: Connection reset by peer","file":"/var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php","line":141}
[2024-04-23 03:39:22] WARNING: E_WARNING: fwrite(): SSL: Broken pipe {"code":2,"message":"fwrite(): SSL: Broken pipe","file":"/var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php","line":360}
Mostly the error is 'connection closed' but I also see 'broken pipe', 'connection reset by peer' and 'cannot select inbox'.
The increase in error frequency does not relate to any particular software upgrade, it just seems to be getting worse over the last 3 or 4 months. Has anyone else noticed this or have any suggestions on how to fix. Thanks.
EspoCRM V8.2.3
Outlook Integration V 1.3.1
Microsoft Exchange 365
Linux Mint V21.3
Apache2 V2.4.52
PHP V8.1.2
MariaDB V10.6.16
I've tried increasing the connection timeout parameter in Imap.php from 30 seconds to 120 seconds with no improvement.
I only check personal email accounts (group emails not in use) and it's a simple system with only 2 mail accounts. Clicking the connection test button for IMAP mail always returns a 'connection is OK' message and no errors are generated in the log.
A typical error log looks like this (though there could be many more errors):-
[2024-04-23 02:04:02] ERROR: JobManager: Failed job running, job '6627156d4f2f02fa1'. Job CheckEmailAccounts 6317592f6a7d0c771: [0] cannot read - connection closed? /var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php:143; at /var/www/html/espocrm/application/Espo/Classes/Jobs/CheckEmailAccounts.php:61.
[2024-04-23 03:39:22] WARNING: E_WARNING: fgets(): SSL: Connection reset by peer {"code":2,"message":"fgets(): SSL: Connection reset by peer","file":"/var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php","line":141}
[2024-04-23 03:39:22] WARNING: E_WARNING: fwrite(): SSL: Broken pipe {"code":2,"message":"fwrite(): SSL: Broken pipe","file":"/var/www/html/espocrm/vendor/laminas/laminas-mail/src/Protocol/Imap.php","line":360}
Mostly the error is 'connection closed' but I also see 'broken pipe', 'connection reset by peer' and 'cannot select inbox'.
The increase in error frequency does not relate to any particular software upgrade, it just seems to be getting worse over the last 3 or 4 months. Has anyone else noticed this or have any suggestions on how to fix. Thanks.
EspoCRM V8.2.3
Outlook Integration V 1.3.1
Microsoft Exchange 365
Linux Mint V21.3
Apache2 V2.4.52
PHP V8.1.2
MariaDB V10.6.16
Comment