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

Pool acquireTimeoutMillis cannot be set higher than 60s #5379

Closed
MattGson opened this issue Nov 13, 2022 · 2 comments
Closed

Pool acquireTimeoutMillis cannot be set higher than 60s #5379

MattGson opened this issue Nov 13, 2022 · 2 comments

Comments

@MattGson
Copy link
Contributor

MattGson commented Nov 13, 2022

Environment

Knex version: 2.3.0
Database + version: Postgres 14

Bug

  1. Explain what kind of behaviour you are getting and how you think it should do

When setting acquireTimeoutMillis > 60_000 (60s) the timeout still occurs after only 60s has elapsed.

There is currently a workaround by setting acquireConnectionTimeout as well.

  1. Error message
TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
  1. Reduced test code
    let db = knex({
		pool: {
			min: 1,
			max:1,		
			acquireTimeoutMillis: 1_200_000,
		}
    });

// with workaround

    let db = knex({
                acquireConnectionTimeout: 1_200_000,
		pool: {
			min: 1,
			max:1,		
			acquireTimeoutMillis: 1_200_000,
		}
    });
	

Created PR here #5377

@apnerve
Copy link

apnerve commented Jan 27, 2023

@MattGson Can you close this issue as your PR has already been merged?

@MattGson
Copy link
Contributor Author

MattGson commented Feb 4, 2023

closed by #5377

@MattGson MattGson closed this as completed Feb 4, 2023
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

2 participants