Quantcast
Channel: Zammad - Community - Latest posts
Viewing all articles
Browse latest Browse all 6760

Scheduler fails with "ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use>"

$
0
0

So I managed to workaround the issue, and verified what I posted before is the issue: database.yml is in the wrong place. It should be in /opt/zammad/config not only in /opt/zammad/config/database/

I copied the default database.yml file and mounted that in the docker template as so:

x-shared:
  zammad-service: &zammad-service
    environment: &zammad-environment
      [..snip..]
    volumes:
      - ./tempdb.yml:/opt/zammad/config/database.yml

Restarted docker and problem solved. No more connection errors in log.

$ docker compose run --rm zammad-scheduler rails r "p ActiveRecord::Base.connection_pool.stat"
[+] Creating 3/3
 ✔ Container docker_zammad_zammad-memcached_1   Recreated                                                                                                                                                                                   0.5s
 ✔ Container docker_zammad_zammad-redis_1       Recreated                                                                                                                                                                                   0.3s
 ✔ Container docker_zammad_zammad-postgresql_1  Recreated                                                                                                                                                                                   0.4s
[+] Running 3/3
 ✔ Container docker_zammad-zammad-memcached-1   Started                                                                                                                                                                                     0.5s
 ✔ Container docker_zammad-zammad-postgresql-1  Started                                                                                                                                                                                     0.4s
 ✔ Container docker_zammad-zammad-redis-1       Started                                                                                                                                                                                     0.3s
I, [2024-05-17T10:53:21.527187 #1]  INFO -- : ActionCable is using the redis instance at redis://zammad-redis:6379.
I, [2024-05-17T10:53:21.578017#1-6060]  INFO -- : Using memcached as Rails cache store.
I, [2024-05-17T10:53:21.578302#1-6060]  INFO -- : Using the Redis back end for Zammad's web socket session store.
{:size=>50, :connections=>0, :busy=>0, :dead=>0, :idle=>0, :waiting=>0, :checkout_timeout=>5.0}


Viewing all articles
Browse latest Browse all 6760

Trending Articles