Katello 3.16.RC5 Initial Content Sync error - ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds

Problem:

On Katello 3.16.RC5, I used the new Ansible Playbooks to install and configure Katello (these are great by the way!) from scratch. I configured 6 CentOS 8 repos as content sources (all set to ‘On Demand’ download policy) and assigned them to a sync plan. When I first ran the Sync Plan and the repos are synchronised, one of them (CentOS 8 Base OS) completed with a warning status:

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

Expected outcome:

Complete the sync without error.

Foreman and Proxy versions:

foreman-installer-katello-2.1.1-2.el7.noarch
katello-3.16.0-0.4.rc5.1.el7.noarch
foreman-release-2.1.1-1.el7.noarch

Distribution and version:

CentOS 7.8

Other relevant data:

Now that I’ve got the Ansible playbooks created, I’ll likely repeat the process on the formal Katello 3.16 release. It’s possible that I don’t have enough CPU or memory assigned - is there anything else I should look at?

Hi,
there’s another thread where people are hitting the error you’re describing: Synchronize repository task hanging . There are even some not-yet-merged fixes suggested there, so if you could take those for a sping, it would be great.

Thanks for the quick reply. I’ve tried running the sync jobs again now, but I’m not able to reproduce it. I’ll try and delete the content repos, re-add them and resync.

Hi,
Just a quick update. I added some more repositories to my Katello instance. When performing bulk sync’s, I encountered this error more frequently:

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

I then applied the PR in https://github.com/Dynflow/dynflow/pull/362 and restarted Katello - I’ve not run into the error since.

Note: I’m still on Katello 3.16 RC5, but will tear it down and move to 3.16 GA shortly. Will apply the PR on the clean install.

2 Likes