-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database.yml is in the wrong location for docker containers #5179
Comments
So basically this function seems to be missing in docker entry point: zammad/contrib/packager.io/functions Line 172 in 0a0935d
|
Can confirm that this happened on our 6.3.1 deployment, too. Adding a bind mount with a correct database.yml file to /opt/zammad/config/database.yml fixes the symptoms. |
Please update your https://github.com/zammad/zammad-docker-compose/blob/master/.env |
Just as info, only putting the variable |
Same here. |
Unfortunately not, only that we ended with an ugly cron every 5 mins... such a shame I know 😞 Just for others as a temporary workaround:
|
What's the effective pool size on the server? You can use the commandline from @JasperE84 to determine that: |
Can you try increasing the pool value via ENV variable? |
I already did it via .env but was concerned about the practical limit of 50 that I read on various forums. What would you consider a reasonable test. Sorry for my concern and therefore my dummy question but our Zammad instance is productive and a bit critical too. |
Good question. It will probably depend on your server's max connection limit. Looks like the default is 100, where a pool size of 50 might already be too high, if all connections are actually used. It will probably not hurt to increase it in small steps like 10 at a time, and try it with that. Maybe also changing the max connections of the server might be interesting. Could be this is something we should consider for this stack. |
Ok, here is a final feedback I increased the value 10 by 10 up to 100 without seeing any effect. After exploring github and the community forum I finally stumbled upon a hint that made me realise that after the initial crash our system was stuck on previous errors. So in the end, setting pools back to 50 and just resetting errors for a clean check under System -> Monitoring did the trick. I will keep a close eye on whether 50 is enough in our case and increase it if necessary, noting here what level gave satisfaction if relevant for the community. Many, many thanks @mgruner |
Used Zammad Version
6.3.1
Environment
Actual behaviour
Scheduler container's log shows errors causing scheduled jobs to fail if using default docker-compose setup:
ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use.
Runtime pool size of
5
isn't equal to value of50
configured in default rails database.yml:When copying the default rails database.yml and mounting it in docker as such, problem is solved:
I think the fix should be something like
contrib/docker/docker-entrypoint.sh
checking for existing~/config/database.yml
symlink to~/config/database/database.yml
and creating it if it doesnt exist. Or movedatabase.yml
from its subdirectory to/config/
directly.More info here:
https://community.zammad.org/t/scheduler-fails-with-activerecord-could-not-obtain-a-connection-from-the-pool-within-5-000-seconds-waited-5-000-seconds-all-pooled-connections-were-in-use/14320/7
Expected behaviour
Scheduled jobs finish without problems
Steps to reproduce the behaviour
$ docker-compose up -d
Support Ticket
No response
I'm sure this is a bug and no feature request or a general question.
yes
The text was updated successfully, but these errors were encountered: