1

Topic: Iredadmin webinterface with 504 Gateway Time-out

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MYSQL edition
- Linux/BSD distribution name and version: ubuntu 16.04
- Store mail accounts in which backend (MySQL):
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes iRedAdmin-Pro-SQL-2.8.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

My Iredadmin Interface is failing to come up and getting the error below from ;
:/var/log/nginx# tail -f error.log | grep iredadmin
2018/10/31 11:28:13 [error] 12450#0: *19096 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xx.x.x.xx, server: xxxx.xxx.xx.xx, request: "GET  iredadmin/dashboard/checknew HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket", host: "xxxx.xxx.xx.xx"
In the amavisd.msgs     database i have 1103946
In the amavisd.msgrcpt     database i have 1105946
I have tried to delete records in DB those files above using the python script (cleanup_amavisd_db.py) but it taking a long time and the webinterface is still down.

My uwsgi service is running as shown below

root@xxxx:/var/log/nginx# ps aux | grep uwsgi
iredadm+  3071  0.0  0.0  69084  9724 ?        S    10:57   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  3078  0.0  0.0 256244 27184 ?        S    10:57   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  3079  0.0  0.0 256244 27184 ?        S    10:57   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  3080  0.0  0.1 264860 33912 ?        S    10:57   0:01 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  3081  0.0  0.0 256244 27184 ?        S    10:57   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  3084  0.0  0.0 256900 27868 ?        S    10:57   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  7646  0.0  0.0  68692  9384 ?        S    07:38   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  7652  0.0  0.0  75104  8872 ?        S    07:38   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+  7653  0.0  0.0  75104  8872 ?        S    07:38   0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
root     13854  0.0  0.0   9468  2008 pts/6    T    07:59   0:00 more /usr/share/uwsgi/conf/default.ini
iredadm+ 14846  0.0  0.1 264912 33928 ?        S    08:01   0:01 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+ 14847  0.0  0.1 258080 33028 ?        S    08:01   0:01 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+ 14848  0.0  0.0 257712 32584 ?        S    08:01   0:01 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
iredadm+ 14849  0.0  0.1 264672 33712 ?        S    08:01   0:01 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/iredadmin.ini --daemonize /var/log/uwsgi/app/iredadmin.log
root     27455  0.0  0.0  11764  2204 pts/12   S+   11:36   0:00 grep --color=auto uwsgi



Wed Oct 31 11:31:50 2018 - uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 216]
IOError: write error xxxx.xxx.xx.xx[pid: 3080|app: 0|req: 5/7] xx.xxx.xx.xxx () {54 vars in 1141 bytes} [Wed Oct 31 11:06:18 2018] GET /iredadmin/dashboard/checknew => generated 0 bytes in 1531947 msecs (HTTP/1.1 200) 2 headers in 0 bytes (0 switches on core 0)

Is there anybody with a quick fix to this?
Thanks
MKK

2

Re: Iredadmin webinterface with 504 Gateway Time-out

- Try to stop uwsgi service first.
- Run command: "ps aux | grep uwsgi", make sure no uwsgi process is running. If there're few, try to kill them with 'kill -9 <pid>' (replace <pid> by the real process id).
- Start uwsgi service again.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Iredadmin webinterface with 504 Gateway Time-out

ZhangHuangbin wrote:

- Try to stop uwsgi service first.
- Run command: "ps aux | grep uwsgi", make sure no uwsgi process is running. If there're few, try to kill them with 'kill -9 <pid>' (replace <pid> by the real process id).
- Start uwsgi service again.

Well, I did completely reboot the machine, so that would have stopped and started the service. Immediately after it came back up I tried it out and it still 504'd.

4

Re: Iredadmin webinterface with 504 Gateway Time-out

PaulCahill wrote:

Well, I did completely reboot the machine, so that would have stopped and started the service. Immediately after it came back up I tried it out and it still 504'd.

Please create a new forum topic and not hijack other's (3-years old) thread.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee