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

Attempt to fix defaultEvictor. #254

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

scream314
Copy link

If pooledResource is not a Resource (but an Error), it won't have lastIdleTime thus all ifs are returning false meaning the Resource (which is already broken in some way) won't get evicted ever, they stay in the pool and this may result in a ResourceRequest Timed Out error (b/c all slots are occupied by stuck Resources).
As a solution, idleTime is checked, and if it is falsy, the Resource gets evicted.

Signed-off-by: Daniel Schopper [email protected]

If `pooledResource` is not a `Resource` (but an `Error`), it won't have `lastIdleTime` thus all ifs are returning `false` meaning the `Resource` (which is already broken in some way) won't get evicted ever, they stay in the pool and this may result in a `ResourceRequest Timed Out` error (b/c all slots are occupied by stuck `Resource`s).
As a solution, `idleTime` is checked, and if it is falsy, the `Resource` gets evicted.

Signed-off-by: Daniel Schopper <[email protected]>
@scream314
Copy link
Author

Please someone shed some light how to interpret the eslint errors in the Travis build log, I cannot figure out, what the problem is.

@sandfox
Copy link
Collaborator

sandfox commented Feb 19, 2019

npm run lint or yarn run lint should fix up the formatting errors which travis is complaining about.

…eError: Converting circular structure to JSON` error

Signed-off-by: Daniel Schopper <[email protected]>
@scream314
Copy link
Author

scream314 commented Apr 30, 2019

This is definitely not good as it is, the added JSON.stringify produces a TypeError: Converting circular structure to JSON. Currently I am testing it with util.inspect instead.

@wadeDra
Copy link

wadeDra commented Aug 13, 2019

I have reported ResourceRequest Timed Out here. I would like to ask what causes” pooledResource is not a Resource (but an Error)“ @scream314

@scream314
Copy link
Author

Sorry, I cannot work on this anymore.
Maybe @steveetm?

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