Project

General

Profile

Bug #30789

Possible database connection pool exhaustion

Added by Adam Ruzicka 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:

Description

By default, we configure the db pool to have 5 available connections. However, we also configure puma to spawn 2 workers with up to 16 threads each. It is possible that if hit with enough requests, puma can run out of connections, leading to errors like:

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

Associated revisions

Revision 026d4743 (diff)
Added by Ewoud Kohl van Wijngaarden 2 months ago

Fixes #30789 - Set DB pool size dynamically

Every thread in the Puma worker can open a database connection. This
means it needs to be taken into account to avoid exhasuting the pool.

History

#1 Updated by The Foreman Bot 3 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-foreman/pull/882 added

#2 Updated by Ewoud Kohl van Wijngaarden 2 months ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Tomer Brisker about 2 months ago

  • Target version set to 2.1.4

#4 Updated by The Foreman Bot about 2 months ago

  • Pull request https://github.com/theforeman/puppet-foreman/pull/890 added

#5 Updated by Tomer Brisker about 2 months ago

  • Target version changed from 2.1.4 to 2.2.0
  • Fixed in Releases 2.1.4, 2.3.0 added

updating target version to make sure we don't miss this for 2.2

#6 Updated by Tomer Brisker about 2 months ago

  • Project changed from Foreman to Installer

#7 Updated by Tomer Brisker about 2 months ago

  • Category set to Foreman modules

#8 Updated by Tomer Brisker about 1 month ago

  • Fixed in Releases 2.2.0 added
  • Fixed in Releases deleted (2.3.0)

#9 Updated by Ewoud Kohl van Wijngaarden about 1 month ago

  • Triaged changed from No to Yes
  • Subject changed from Possible connection pool exhaustion to Possible database connection pool exhaustion

Also available in: Atom PDF