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

Make max pool size adjustable #218

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Make max pool size adjustable #218

merged 1 commit into from
Mar 6, 2024

Conversation

plars
Copy link
Collaborator

@plars plars commented Mar 5, 2024

Description

In an attempt to still try to resolve why sometimes connections timeout, I'm trying to look at the possibility that the connections pools may be getting exhausted and staying that way for a while. I've tried increasing the number of pods to get more available connections and so far it hasn't helped too much. But I'm hoping maybe this could also give me something to tweak.

@plars plars requested a review from a team March 5, 2024 22:45
Copy link

@omar-selo omar-selo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for reference do you know for sure that the timeouts are caused by the database not the server?

@plars
Copy link
Collaborator Author

plars commented Mar 6, 2024

Just for reference do you know for sure that the timeouts are caused by the database not the server?

Not for certain, no. I do definitely see some random times where a query will take a long time, sometimes even as much as 3 seconds. However it's hard to see how some of the API calls timeout after 15s from something like that. The timeouts on those API calls happen very randomly. For example, someone showed me logs from yesterday where they saw one happen while it was waiting on a job to start, but I also have a long running job to try to see how often it occurs and haven't seen a single timeout in over 3 days.

As for the connection pool availability, I think I found a way on the db side to check that, and the typical usage is about 10 of >400 available now that I've deployed 4 units. However if I repeatedly check it for long enough, I'll sometimes see it jump up to almost 400 in use, but <1s later it's back down to about 10 or so.

I haven't found a way, so far, to see any kind of event where the connection pool is exhausted for a long duration (e.g. >1s), so figuring out whether this is actually the problem is a bit tricky. What I'm hoping, is that if I carefully increase the connection pool size while monitoring db server load, then perhaps I can find a point where it maxes out and could have created more, but doesn't ever have a need to.

@plars plars merged commit ecb63e9 into main Mar 6, 2024
3 checks passed
@plars plars deleted the adjustable-max-pool-size branch March 6, 2024 14:12
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.

2 participants