Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upwaitingClients grows w/o bounds #108
Comments
timothykimball
referenced this issue
Dec 12, 2015
Closed
bug w/ generic-pool effects node-postgres #902
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Dec 13, 2015
Collaborator
Indeed, at the moment the "waiting list" for resources is unbounded and it's up to user to check the size of the "waiting list" and do what they want with that information. I don't have strong feelings either way about allowing the user to supply an optional bounds for the "waiting list, but I don't think it will provide much value over what it already achievable.
In terms of solutions to this problem I can think of a couple of things:
- returning some kind of handle when
pool.acquireis called, so that "resource requests" can be cancelled by the user before they are fulfilled. (and possibly some other stuff too) - Allow an acquire timeout value as one of the args taken by
pool.acquireso that "resource requests" will be removed
Both of them seem useful and there are several requests for 2 already #85 #94 , but I've not had any time to do it and the pull-request #82 needs some work to pass the tests last time I looked)
|
Indeed, at the moment the "waiting list" for resources is unbounded and it's up to user to check the size of the "waiting list" and do what they want with that information. I don't have strong feelings either way about allowing the user to supply an optional bounds for the "waiting list, but I don't think it will provide much value over what it already achievable. In terms of solutions to this problem I can think of a couple of things:
Both of them seem useful and there are several requests for 2 already #85 #94 , but I've not had any time to do it and the pull-request #82 needs some work to pass the tests last time I looked) |
sandfox
self-assigned this
Dec 13, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
DanielYWoo
May 26, 2016
+1
If we reach maxWaitClients, acqurie() should fail-fast and throw an error
DanielYWoo
commented
May 26, 2016
|
+1 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
catblade
Jun 9, 2016
Can we add a cleanup option to said clients that calls something like "forceDestroy" set-able by the client object?
catblade
commented
Jun 9, 2016
|
Can we add a cleanup option to said clients that calls something like "forceDestroy" set-able by the client object? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
sandfox
Oct 30, 2016
Collaborator
there is now a maxWaitingClient option and acquireTimeout which should help here.
|
there is now a |
timothykimball commentedDec 12, 2015
Scenario:
Log of behaviour:
Notes: