Skip to content
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

Dataloader never exits Task.Supervisor spawned inside async_safely causing a memory leak #47

Closed
samsondav opened this issue Sep 10, 2018 · 0 comments · Fixed by #48
Closed

Comments

@samsondav
Copy link

samsondav commented Sep 10, 2018

We've been seeing ballooning memory usage on our production servers.

The memory is taken up by Task.Supervisor spawned here: https://github.com/absinthe-graphql/dataloader/blob/master/lib/dataloader.ex#L232. Each time that async_safely is run, a new supervisor is spawned which is never cleaned up.

For large queries, this supervisor can take up considerable memory (I’m not sure why, this may be another, different bug). In our case it takes 32MB per supervisor.

Certain queries can cause Absinthe.run to be called upwards of 30 times, which gives rather large memory requirements.

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

Successfully merging a pull request may close this issue.

1 participant