Allow some services to not use a connection pool to the DB#1262
Merged
Allow some services to not use a connection pool to the DB#1262
Conversation
Some services managed by supervisor do need the DB during startup only to make at most a handfull of queries (if even). However, because they're using a connection pool behind the scenes, the connections are kept in that pool for some time unnecessarily. This commit adds a way to disable connection pooling with an environment variable. This env var is enabled for all services that currently use the DB during startup only.
This was referenced Apr 6, 2026
Fragger
approved these changes
Apr 7, 2026
Collaborator
Fragger
left a comment
There was a problem hiding this comment.
This looks good to me. On a fresh crcon restart with this, I'm at 97 connections for 10 servers (all currently idle) vs the 147 I was the other day but that wasn't at a fresh restart. A fresh restart without this with 10 servers idle looks like around 127 connections.
Collaborator
Author
Yeah, the impact of this PR is small, but I would say still noticeable. And it is a quick win (not much work to do :D). |
Signed-off-by: Florian <floriansw@t-online.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some services managed by supervisor do need the DB during startup only to make at most a handfull of queries (if even). However, because they're using a connection pool behind the scenes, the connections are kept in that pool for some time unnecessarily.
This commit adds a way to disable connection pooling with an environment variable. This env var is enabled for all services that currently use the DB during startup only.