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

improve: add ability to configure maximumPoolSize. #480

Merged
merged 1 commit into from
May 7, 2022

Conversation

matthew-white
Copy link
Member

This PR adds the ability to configure maximumPoolSize for Slonik. See #476 for more on why it could be useful to change the pool size. We originally planned to set maximumPoolSize to a constant, but ultimately decided to make it configurable. With this PR, the user can specify maximumPoolSize in their database config; it defaults to 10. We use the database config to connect to both Slonik and Knex, but we only need to use maximumPoolSize with Slonik: Knex has its own approach to pooling. That means that part of the work of this PR is forwarding maximumPoolSize on to Slonik but not Knex.

@matthew-white matthew-white requested a review from ktuite May 6, 2022 01:01
@matthew-white matthew-white merged commit e171b93 into master May 7, 2022
@matthew-white matthew-white deleted the config-pool-size branch May 7, 2022 03:57
@lognaturel
Copy link
Member

For posterity: we decided to keep the default at 10 for now because we bumped it to 25 on a server with 4gb of RAM and started seeing many more premature close errors. It's not entirely clear that the errors were related to the pool size change and it's particularly weird that they continued once the value was changed back to 10. But we didn't have more time to spend on this immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants