-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feature request: Ability to disable reaping #56
Comments
Could you point to the docs, which describes that AWZ Lambda timefreeze functionality? I don't understand how Lambda could know that it can freeze an app which has timers running and how that affects to the app when it gets unfreezed (are all the timers triggering in the same moment or what) 🤔 Also I don't thing that issue knex/knex#3636 can be caused from that, because reaping has nothing to do with the fact that connections are broken behind the scenes without socket noticing it. Maybe you are really looking for a manual API to allow emptying all connections from pool which are not leased at the moment? Please try to explain your issue exactly and how this feature would actually solve it? |
Thank you for the quick response. Here's some context regarding Lambda: I didn't mean that the knex issue was caused by the reaping, sorry if it "sounded" that way. The issue is (not specific to this package, but this package can solve it):
A simple solution is to call What I want out of this feature request is to be able to opt-out of automatic checking on an interval. |
I think allowing user to explicitly call an extra reaping cycle would be a good idea. Otherwise it really might not happen soon enough that those broken connections would be discarded (if there are too many other timers, that needs to be ran just after unfreeze). Though I don't see any advantage of disabling the reaping interval completely. |
@EmilIvanov Would you like to send a PR that would add support for invoking reaping cycle manually? |
I'm actually working on partial rewrite and might fix this at the same time. |
pool.check()
-ing on an interval / timeout, in the context of AWS Lambda, doesn't work as the run time gets frozen, leading to issues like knex/knex#3636.A possible solution to the above may be having the ability to disable reaping (e.g.
reapIntervalMillis: false
, ordisableReaping: true
) and do manualpool.check()
-ing.The text was updated successfully, but these errors were encountered: