Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Memory leaks on subscription components. #432

Closed
wtrocki opened this issue Jun 16, 2020 · 4 comments
Closed

Memory leaks on subscription components. #432

wtrocki opened this issue Jun 16, 2020 · 4 comments

Comments

@wtrocki
Copy link
Contributor

wtrocki commented Jun 16, 2020

Feature Request

We need to subscribe to the data globally as a component is rendered with multiple subscriptions being active.

(node:59126) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.

Also one of the reasons for aerogear/offix#499

@wtrocki wtrocki self-assigned this Jun 17, 2020
@wtrocki wtrocki removed their assignment Jun 25, 2020
@wtrocki
Copy link
Contributor Author

wtrocki commented Jun 25, 2020

This happens only for the InMemoryPub sub.
Looks like sample app subscribes multiple times, but we actually trying to resolve this problem directly in offix datastore so there is no sense to resolve it temporarily.

CC @kingsleyzissou

@wtrocki wtrocki closed this as completed Jun 25, 2020
@kingsleyzissou
Copy link
Contributor

@wtrocki I actually noticed this problem yesterday. It's our useSubscribeToMore hook, it is actually subscribing to the subscription multiple times rather than just once. I think it may need to be refactore... but, this approach will definitely change with the datastore.

@wtrocki
Copy link
Contributor Author

wtrocki commented Jun 25, 2020

Ok so this will be offix issue rather than datasync.
I did not went deep. Maybe makes sense to create offix issue then - question if we resolve it is different topic

@kingsleyzissou
Copy link
Contributor

I think it was a custom hook that we used in the DataSync starter. I've resolved it now, so we should be good. Also no need to create an issue in Offix, because this hook was just a helper that I created that wasn't very good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants