Zammad operates with apache 2.4 as rev. proxy and haproxy for ssl termination, the zammad_production database is on a separate mariadb database.yml: adapter: mysql2)
Expected behavior:
stable database connection for mariadb
Actual behavior:
zammad looses connection to remote database server which leads to a service unavailable (http code 503) on the zammad port 3000:
root@develd:/opt/zammad/config# curl -v localhost:3000
* Rebuilt URL to: localhost:3000/
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 3000 failed: Connection refused
* Failed to connect to localhost port 3000: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 3000: Connection refused
The main issue is that the connection to the database server is gone.
Zammad doesn’t like that but theoretically should survive it and jump back in as soon as the connection is back.
The question how this source code application is being started. Because that could bringt differences.
Restarting Zammad should be fine, but I guess the main problem is your db going away which is in general very bad for Zammad as it’s potentially doing a lot in your database.
Hi,
my info was not correct, it was not a database issue, the database server runs on the same PVE machine (proxmox) and the db connection is not the problem. The config change in apache recommended by @piken helped here, but his Proxy Pass syntax is not working on apache 2.4, instead my syntax is
<IfModule proxy_module>
ProxyRequests Off
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}
ProxyPass /assets !
ProxyPass /favicon.ico !
ProxyPass /robots.txt !
ProxyPass /ws ws://127.0.0.1:6042/
ProxyPass / http://127.0.0.1:3000/ connectiontimeout=5 timeout=600
ProxyPassReverse / http://127.0.0.1:3000/
</IfModule>