1

Topic: Roundcube very often timeouts and Database Aborted connections

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.1
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04.6 server
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No I have the open source installed
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Dear Sirs,
A few months ago I started to have quite often Roundcube webmail timeouts when I update messages list, compose email, change to a different mail folder etc
Searching for the route cause of the problem, I firstly found errors on /var/log/php-fpm/php-fpm.log these errors have the form:
127.0.0.1 -  20/Dec/2024:07:39:02 +0200 "GET /status" 200
Dec 20 07:39:05 mx php-fpm[612]: [WARNING] [pool inet] child 312120, script '/opt/www/roundcubemail/index.php' (request: "POST /mail/index.php?_task=mail&_action=refresh") executing too slow (6.209691 sec), logging
Dec 20 07:39:05 mx php-fpm[612]: [NOTICE] child 312120 stopped for tracing
Dec 20 07:39:05 mx php-fpm[612]: [NOTICE] about to trace 312120
Dec 20 07:39:05 mx php-fpm[612]: [NOTICE] finished trace of 312120

Looking further I found possible related problems on the MySQL (MariaDB) log on /var/log/mysql/error.log these errors have the form:
2024-12-20  7:39:23 21881 [Warning] Aborted connection 21881 to db: 'vmail' user: 'vmailadmin' host: 'localhost' (Got an error reading communication packets).
The problem doesn't seem to be related to my VPS server that is very capable having 60 GB RAM 10 CPU Cores, SSD Disk etc and I have no other problems. Also I use this VPS solely for iRedMail

I think these problems was started when upgraded iRedMail from 1.6.8 to 1.7.0 possible is related to "enabled jail names in SQL database" ? I don't know
Also, looking at amavisd mysql database found quarantine table very big 49,872,896 I don't know if this cause the problem, as I don't use iRedAdmin-Pro I am thinking how to stop the database storage that is related solely to iRedAdmin-Pro. My server has excess of spam and hacking tries so the each incident to be stored on MySQL might be the problem (?).

I don't know what else to do or to look at so PLEASE help me to solve this very nasty problem.

Thank and Best Regards,
Mike Kranidis

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube very often timeouts and Database Aborted connections

Add "log_warnings = 1" in mysql server config file should fix this issue:

[mysqld]
log_warnings = 1

3

Re: Roundcube very often timeouts and Database Aborted connections

ZhangHuangbin wrote:

Add "log_warnings = 1" in mysql server config file should fix this issue:

[mysqld]
log_warnings = 1

Dear Sir,
as you instructed I put the above at /etc/mysql/my.cnf file and then I restarted systemctl restart mysqld.service 
Unfortunately this doesn't solve or improve the problem. Roundcube still very often timeouts. Please tell me what else to check? Just to mentioned that after the reported problem I installed a lighter webmail, rainloop and I observed the same problem but the timeout it is not so often as in roundcube case. Also if I use Thunderbird email client then all seems ok.
I think that the problem appeared when upgraded iRedMail from 1.6.8 to 1.7.0 , what do you think.

Many thanks.

4

Re: Roundcube very often timeouts and Database Aborted connections

mikekgr wrote:

I think that the problem appeared when upgraded iRedMail from 1.6.8 to 1.7.0 , what do you think.

Did you upgrade OS release before or after upgrading iRedMail?

5

Re: Roundcube very often timeouts and Database Aborted connections

ZhangHuangbin wrote:
mikekgr wrote:

I think that the problem appeared when upgraded iRedMail from 1.6.8 to 1.7.0 , what do you think.

Did you upgrade OS release before or after upgrading iRedMail?

OS release is still Ubuntu 20.04.6 LTS nothing change before or after upgrading iRedMail except all Ubuntu security and system's updates. See:
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS

Also I change accordingly the /etc/iredmail-release
1.7.1 MARIADB edition.