1

Topic: 504 Gateway Time-out

==== 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:
====

Recently our SOGo web URL has been timing  out with "504 Gateway Time-out" very frequently. The email sending/receiving functionalities using ActiveSync also seem to have been affected due to the above or somehow related to the above. The POP3 seem to be working fine.

Any idea why it might be happening? What logs to check to get to the root cause of this issue? Have rebooted the server once previously and things seem to work fine for a few days and back to the same problem again.

----

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

2

Re: 504 Gateway Time-out

Check /var/log/sogo/sogo.log.
I GUESS you don't have enough SOGo child processes to handle the requests, but we need to check its log file to figure out the real problem.

3

Re: 504 Gateway Time-out

You are right - please see below log snippet. How can I go about increasing the child processes? Also, why this would start happening all of a sudden after almost using the server/sogo service for about a year now?


[root@XXXXX superuser]# tail /var/log/sogo/sogo.log
May 22 20:53:00 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!
May 22 20:53:01 sogod [26372]: <0x0x7feb280193d0[SOGoActiveSyncDispatcher]> Sleeping 15 seconds while detecting changes in Ping...
May 22 20:53:01 sogod [1018]: <0x0x7feb28019490[SOGoActiveSyncDispatcher]> Sleeping 5 seconds while detecting changes in Ping...
May 22 20:53:01 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!
May 22 20:53:03 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!
May 22 20:53:04 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!
May 22 20:53:05 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!
May 22 20:53:06 sogod [26372]: <0x0x7feb280193d0[SOGoActiveSyncDispatcher]> Sleeping 10 seconds while detecting changes in Ping...
May 22 20:53:06 sogod [1018]: <0x0x7feb28019490[SOGoActiveSyncDispatcher]> Sleeping 30 seconds while detecting changes in Ping...
May 22 20:53:07 sogod [2629]: [ERROR] <0x0x7feb27f7fb30[WOWatchDog]> No child available to handle incoming request!

4

Re: 504 Gateway Time-out

For CentOS, please increase the value of "PREFORK=" setting in /etc/sysconfig/sogo, then restart sogod service.