Zammad looosing remote mariadb database connection

  • Used Zammad version: 3.3
  • Used Zammad installation source: source
  • Operating system: ubuntu 18.04 lts

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
* connect to 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

Was just having same problem but on the WS

You should have info in your httpd / error log too

Connection refused: AH00957: WS: attempt to connect to ( failed
failed to make connection to backend:

Changed my apache conf as suggested, try it, if you’re not already.

ProxyPass /

ProxyPass / “retry=1 acque=3000 timeout=600 keepalive=On”

Worked for me on the web socket

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.

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://
        ProxyPass / connectiontimeout=5 timeout=600
        ProxyPassReverse /

This is running stable since last THU …

ProxyPass / “retry=1 acque=3000 timeout=600 keepalive=On”

That was from a previous forum post, besides having a miss spelling, yes, had issues,
apache 2.4 didn’t like the quoting

Here’s what I’m using now on the websocket and is working for me, should of re-posted.

ProxyPass “/ws” “ws://” keepalive=On retry=1 acquire=3000 timeout=600

Same here, after updating, everything has been running great.

@MrGeneration Maybe Kens and my experiences with “keepalive=On retry=1 acquire=3000 timeout=600” should be included in the official documentation?

It is:

Those don’t work anymore. If they ever did?

First acque is miss spelled should be acquire

Second Apache doesn’t like the quoting

This format will fail ProxyPass /ws ws:// “retry=1 acque=3000 timeout=600 keepalive=On”

This will work ProxyPass “/ws” “ws://” keepalive=On retry=1 acquire=3000 timeout=600


ProxyPass “/example” “” max=20 ttl=120 retry=300

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.