-
Notifications
You must be signed in to change notification settings - Fork 132
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
withFilter is causing memory leakage because using recursion #212
Comments
Also experiencing this big time. Using the new withFilter code from the pull request seems to fix it. |
Also suffering disproportionately due to this issue; is there anything I can do to help this fix be merged? |
@alexmcmillan get attention from repository contributors :) |
@urossmolnik so the PR is otherwise acceptable? Damn. Just noticed we're coming up to 4 months since the last commit to this repo... are there any alternatives that are being maintained? |
@alexmcmillan I think so. I have another branch on my fork with fixed tests and post-install script so you can install this package directly from github. If you want to test that just point |
@glasser Any news on this? |
Hi @kundkingan. I'm newly responsible for maintaining Apollo Server but I'm not sure if the scope of that work is going to include Is it possible to write a test for the proposed fix PR? That would make it easier to merge as somebody not super familiar with this codebase. Maybe something like this Apollo Client test using FinalizationRegistry? apollographql/apollo-client#7661 (Fine if it's just a top-level test that we have to explicitly link in to CI.) |
Fix released in 1.2.1. Thanks to @urossmolnik for your patience and an excellent test that allowed me to comfortably merge the PR despite not quite understanding how it achieved its goals. |
withFilter
function is causing memory leak because of Promise spec. Related: nodejs/node#6673.This is a big problem when you have long living subscriber to subscription who skips most of messages (all Promises in recursion chain are kept in memory).
How to reproduce:
Start a subscriber to a subscription which rejects messages and start publishing messages. You'll notice memory keeps increasing. Memory profile will confirm.
Solved by #209
The text was updated successfully, but these errors were encountered: