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

idleTimeout with DISABLE_TIMEOUT set will use a 10s timeout #569

Open
aaboyd opened this issue May 1, 2024 · 0 comments
Open

idleTimeout with DISABLE_TIMEOUT set will use a 10s timeout #569

aaboyd opened this issue May 1, 2024 · 0 comments

Comments

@aaboyd
Copy link

aaboyd commented May 1, 2024

We are working on an old version and the code is somewhat different now, but I believe idleTimeout does not behave appropriately when DISABLE_TIMEOUT is passed in.

https://github.com/gajus/slonik/pull/340/files#r998013762 is relevant to the current version I am using. This causes pg.Pool to use its default idleTimeoutMillis instead of disabling it.

In the latest version (https://github.com/gajus/slonik/blob/7fd10b89602d9f8098616b797c971e71a8fae34d/src/factories/createPoolConfiguration.ts#L11C1-L36C3), the default value for idleTimeout in createPoolConfiguration is set to 10_000. If idleTimeout is set to DISABLE_TIMEOUT, the default value is not set to 0. This forces 10_000 when using DISABLE_TIMEOUT

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

No branches or pull requests

1 participant