Closed joerou closed 3 years ago
It seems you are using graphql subscription? Maybe you aren't doing the proper clean-up.
The proper cleanup? on react unmount I am stopping the subscriptions, is there something that I'm missing?
@joerou help me clarify are you subscribing via GraphQL subscriptions? If so, do you have a mechanism to switch off Meteor subscriptiosn from GraphQL (server-level)?
Well, I'm using the subscription method from your package, same as the api docs query.subscribe()
In this case I'm wiring everything up through your package. I didn't see the need in the docs to switch off Meteor subscriptions from GraphQL on the server.
To be completely honest, I had to switch back to plain Meteor subscriptions and not use your package, but I think there's some other's following this thread, so I'm happy to trouble shoot and document for the future. If this is really not worth your time, I'm happy to leave it until someone else reopens the thread.. Thanks for taking the time!
Hello,
Great Package!
I am not 100% sure this is a problem with this package or the code I wrote around it, but was hoping someone here might be able to spot the problem. I'm using the logs in Apm.meteor.com and see that I have quite a lot of observers that aren't getting cleaned up, which would suggest a memory leak and they seem to only be happening with the named queries, which results in documents continuing to be fetched even after all active subscriptions have gone away.
I don't have any hidden business logic, so I just use a simple json structure like so to create my queries and then wire them up and include that on both server and client (using the expose function in a Meteor.isServer block) (see also below)
As you can see in the attached screen shots, There seems to be some small leak on some publications (ex. 21 observers created, 17 removed and consistently less removed over a 24 hours period) and on others there just is none being removed ever. and documents continue to be fetched with no active subs.