Skip to content
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

Apply only very conservative database connection reduction changes #14066

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

AlanCoding
Copy link
Member

SUMMARY

Replaces #14034 but avoids closing connections for clients that will periodically re-open them (with I guess the exception of the callback receiver main process, but if we have pushback we should delete the log because it is pointless).

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

Updated connections for an idle system after this change.

 pid |         application_name          | state  
-----+-----------------------------------+--------
  31 |                                   | 
  33 |                                   | 
  42 | awx-145-ws_heartbeat-awx_1        | idle
  44 |                                   | idle
  45 | awx-137-dispatcher_listener-awx_1 | idle
 321 | awx-379-dispatcher_worker-awx_1   | idle
  47 | awx-147-rsyslog_configurer-awx_1  | idle
  48 | awx-150-cache_clear-awx_1         | idle
 326 | psql                              | active
 324 | awx-381-dispatcher_worker-awx_1   | idle
 323 | awx-385-dispatcher_worker-awx_1   | idle
 319 | awx-375-dispatcher_worker-awx_1   | idle
  29 |                                   | 
  28 |                                   | 
  30 |                                   | 
(15 rows)

Findings is that it had 12 connections before this change and this has 8 connections now.

@AlanCoding AlanCoding merged commit fbaeb90 into ansible:devel Jun 1, 2023
14 checks passed
relrod added a commit to relrod/awx that referenced this pull request Jun 5, 2023
As we are starting to explore database performance options and be more
proactive about which connections are long-lived (see ansible#14066
and ansible#14067), this provides an easy way to spin up pgbouncer in the dev
environment to play around with.

Signed-off-by: Rick Elrod <rick@elrod.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants