-
Notifications
You must be signed in to change notification settings - Fork 43
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
[Memory-Leak]: Unsubscribe and return from iterator is missed, when using subscription´s onDisconnect #16
Comments
@TimSusa @jonas-arkulpa Hi! Is there any news about this? I've been reading related issues and I'm not sure anymore if this is a problem in this package, in user apps, or in I'd like to horizontally scale my GraphQL server soon and I think subscriptions are the only concern for now. Any workaround or hint to minimize these problems? Thanks! |
Hey @frandiox , If I would currently plan to scale a GraphQL server I would separate the subscription part (stateful) from the rest (stateless) into different services. More input or fixing PRs would be very welcome. P.S.: Still active in the onsen-ui community? 🙂 |
@jonas-arkulpa I see, thanks for the answer!
Yeah I was thinking in deploying the server twice under two domains and use one of them only for subscriptions. If it crashes at least it won't take down the whole app.
Hah, not really, I left almost 2 years ago, but it's nice to see people who still know about that project 😄 |
Hey guys, any updates on this issue? I would really like to use this in my project and am willing to contribute my time to help fix this bug. Please let me know if anyone has more information regarding the memory leak. I have only just discovered this repo and still familiarizing myself with the source. p.s. |
Hey Umran, thx for your interest! Any available information is documented
in the open issues.
I missed documenting our findings and open ends at the time we invested
more time investigating.
Feel free to open a PR if you find something helpful, I am happy to take a
look and review the changes.
But otherwise I unfortunately do not have any spare time for this project
as stated above.
|
Notes
Analysis of Log Data (We found a moment, where unsubscribe would be missed):
Question
Would an alternative approach make sense here?
New Approach to discuss
...
Feedback from Nacho (Google) to this Implementation
It seems that you have 800k instances of Promises, which is taking 80% of your memory. This most frequently happens when a Promise is neither resolved or rejected, which looking at your code could be happening at pullValue:
You are delaying the resolution of the Promise by adding it to pullQueue, could it be that nobody is pulling that data later? My guess is that there is no cleanup of these delayed Promises by either resolving or rejecting.
A test case for this would be useful. I am forwarding this to a colleague in case they can offer an additional insight.
The text was updated successfully, but these errors were encountered: