Project

General

Profile

Bug #24220

In development: ActiveRecord::ConnectionTimeoutError in the logs..Recovers after a few attempts..

Added by Samir Jha 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Development tools
Target version:

Description

Get this error in the logs and the server takes some time to load since all connections are busy at the moment. ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use)

Associated revisions

Revision d1778057 (diff)
Added by Ivan Necas 4 months ago

Refs #24220 - increase recommended pool size for the db (#165)

Since Rails 5, it seems the webrick is not limited on single request at
a time, which leads to 500s when loading the dasboards, especially with
plugins.

Suggesting to increse the default pool size in the database.yml
to avoid users running into this.

Revision 8c7be857 (diff)
Added by Ivan Necas 4 months ago

Fixes #24220 - increase recommended pool size for the db

Since Rails 5, it seems the webrick is not limited on single request at
a time, which leads to 500s when loading the dasboards, especially with
plugins.

Suggesting to increse the default pool size in the database.yml
to avoid users running into this.

History

#1 Updated by Justin Sherrill 4 months ago

  • Category deleted (Database)
  • Subject changed from ActiveRecord::ConnectionTimeoutError in the logs..Recovers after a few attempts.. to In development: ActiveRecord::ConnectionTimeoutError in the logs..Recovers after a few attempts..
  • Project changed from Katello to foreman-tasks

We've seen this a lot in katello, but it seems to only occur when the dynflow world gets initialized.

#2 Updated by Ivan Necas 4 months ago

  • Project changed from foreman-tasks to Foreman

I don't think it has anything to do with Foreman-Tasks, it seems that in rails 5, the lock on 1-request at a time was removed, which leads to the dashboard spinning up more concurrent requests that the db pool is ready for. The proper fix should be to increase the db pool in `config/database.yml`.

#3 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ivan Necas
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5827 added

#4 Updated by Ivan Necas 4 months ago

  • Pull request https://github.com/theforeman/puppet-katello_devel/pull/165 added

I've sent patches to foreman and katello_devel to increase the pool size with numbers I've stopped getting the issues like this.

#5 Updated by Tomer Brisker 4 months ago

  • Target version set to 1.19.0
  • Fixed in Releases 1.19.0 added

#6 Updated by Ivan Necas 4 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#7 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/foreman/pull/5822 added

#8 Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Category set to Development tools

Also available in: Atom PDF