1

Topic: Queue file write errors?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Hello,

Recently our iRedmail server has been acting up with the following issue.

We primarily use Active Sync protocol to connect to our mailboxes using Outlook, Phones,etc. All of a sudden we would get this message saying "couldn't login to mailbox" errors on our phones, and outlook would also prompt for username/password. At the same time, the SoGO would also unable to login users (see screenshot).

Today as the problem happened again I did tail -f /var/log/maillog and I can see tons messages like shown below.

FYI - I restarted the sogo service and it did not help. The only option is to restart the server to get everything back online... btw, the only change I made recently was as you suggested in this thread http://www.iredmail.org/forum/topic1276 … meout.html  - Co-incidentally this new problem has only been happening since I made the change as suggested in that thread.

Any idea?

Jun 15 17:26:10 SERVERNAME postfix/pickup[8659]: warning: maildrop/43A56504851: error writing D7272504874: queue file write error
Jun 15 17:26:11 SERVERNAME postfix/pickup[8659]: D794D504874: uid=991 from=<sogo>
Jun 15 17:26:11 SERVERNAME postfix/cleanup[28694]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "sogo@SERVERNAME.MYDOMAIN.COM"
Jun 15 17:26:11 SERVERNAME postfix/cleanup[28694]: warning: D794D504874: sender_bcc_maps lookup problem
Jun 15 17:26:11 SERVERNAME postfix/pickup[8659]: warning: maildrop/D6F74504861: error writing D794D504874: queue file write error
Jun 15 17:26:12 SERVERNAME postfix/pickup[8659]: D8005504874: uid=991 from=<sogo>
Jun 15 17:26:12 SERVERNAME postfix/cleanup[28694]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "sogo@SERVERNAME.MYDOMAIN.COM"
Jun 15 17:26:12 SERVERNAME postfix/cleanup[28694]: warning: D8005504874: sender_bcc_maps lookup problem
Jun 15 17:26:12 SERVERNAME postfix/pickup[8659]: warning: maildrop/BD6F3504866: error writing D8005504874: queue file write error
Jun 15 17:26:13 SERVERNAME postfix/pickup[8659]: D8719504874: uid=991 from=<sogo>
Jun 15 17:26:13 SERVERNAME postfix/cleanup[28694]: warning: proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf lookup error for "sogo@SERVERNAME.MYDOMAIN.COM"
Jun 15 17:26:13 SERVERNAME postfix/cleanup[28694]: warning: D8719504874: sender_bcc_maps lookup problem
Jun 15 17:26:13 SERVERNAME postfix/pickup[8659]: warning: maildrop/435C7504864: error writing D8719504874: queue file write error

----

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

2

Re: Queue file write errors?

*) Is MySQL service running?
*) Disk full?
*) Do you have enough SOGo child processes to handle new connections? Check file /etc/sysconfig/sogo.

3

Re: Queue file write errors?

ZhangHuangbin wrote:

*) Is MySQL service running?
*) Disk full?
*) Do you have enough SOGo child processes to handle new connections? Check file /etc/sysconfig/sogo.

1) According to the log errors, MySQL service is not running when the problem hits.
2) Only 4% of the total disk space is used on the server.
3) It is currently set to 25. It was at 10 and I increased it to 25 (the other thread I linked above, where I reported 504 Gatway errors with Sogo, and you advised that I increase the child processes... so I increased it from 10 to 25).

FYI - We do have one single mailbox in this iredmail server where we are receiving about 1000 (sometimes more) email within a span of 24 hours... (legit system monitoring emails we receive from many servers in our server farm). Could it be this single mailbox (due to high mail traffic) causing all these issues?

4

Re: Queue file write errors?

No clear idea right now, did you see any related error in Postfix/Dovecot/Amavisd log files?
FYI: http://www.iredmail.org/docs/file.locations.html

5

Re: Queue file write errors?

ZhangHuangbin wrote:

No clear idea right now, did you see any related error in Postfix/Dovecot/Amavisd log files?
FYI: http://www.iredmail.org/docs/file.locations.html

I will check those additional log files in real-time if the problem comes back again... Btw, about 12+ hours ago we disabled all inbound emails on that single mailbox that I told you about earlier (high volume of emails) and interestingly enough the problem I originally reported on this thread hasn't come back so far (we may have to wait another few days and monitor the server before coming to a conclusion if those high volume of emails was the root cause of this issue or not).

Meanwhile, I saw the following message delivered in the postmaster mailbox (this was about 6 hours AFTER we disabled the above high volume email, and the messages similar to the one below used to be delivered a lot BEFORE we disabled those high volume emails). So, I don't know if this could give you any hint of the root problem...

Subject Line: Cron <sogo@SERVERNAME> /usr/sbin/sogo-tool expire-sessions 30; /usr/sbin/sogo-ealarms-notify

Content:

2017-06-19 06:41:05.705 sogo-tool[3444] ERROR: could not open MySQL4 connection to database 'sogo': Can't connect to MySQL server on '127.0.0.1' (111)
<0x0x269a670[GCSChannelManager]> could not open channel <MySQL4Channel[0x0x2774f80] connection=0x(null)> for mysql://127.0.0.1/sogo/sogo_sessions_folder
<0x0x269a670[GCSChannelManager]>   will prevent opening of this channel 5 seconds after 2017-06-19 06:41:05 -0400
2017-06-19 06:41:05.733 sogo-tool[3444] Can't aquire channel
2017-06-19 06:41:05.897 sogo-ealarms-notify[3666] ERROR: could not open MySQL4 connection to database 'sogo': Can't connect to MySQL server on '127.0.0.1' (111)
<0x0x1dcc8e0[GCSChannelManager]> could not open channel <MySQL4Channel[0x0x1c186b0] connection=0x(null)> for mysql://127.0.0.1/sogo/sogo_alarms_folder
<0x0x1dcc8e0[GCSChannelManager]>   will prevent opening of this channel 5 seconds after 2017-06-19 06:41:05 -0400

6

Re: Queue file write errors?

What's the max connections setting in MySQL config file (my.cnf)?

SOGo requires 2 SQL connections for EACH child process.

7

Re: Queue file write errors?

I checked the /etc/my.cnf file and I am not sure exactly which variable controls the settings you talking about... However, I ddi see the below two lines (which seems to be related to what you said)...but as you can see both lines are commented out.

#max_connections=1024
#max_connect_errors=150

8

Re: Queue file write errors?

purathal wrote:

#max_connections=1024

Uncomment this line, restart mysql service and keep tracking for few days. If no more such error, then this setting should be fine.