You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
I'm currently developing a GraphQL hub that serves as a proxy to many other GraphQL servers. These servers accept persisted queries and I thought it would be really nice to use this package for sending them hashed queries. However, after some time in production, my GraphQL hub started running out of memory. After much investigation, our team found out that this package was the evil of our memory leak.
The leak occurs because this package tries to optimize the query computation by using a Map as a cache, and this map grows indefinitely. leak
My fix proposal is to accept a cache implementation with the interface defined by apollo-server-caching so we can use the cache implementation that best fits our needs (with Map as the default value for this cache)
What do you guys think ?
Thank you !
The text was updated successfully, but these errors were encountered:
Should fix#26, since the hash can now be garbage collected whenever the
query object is collected, and query objects are no longer kept alive by
the calculated Map.
. (#29)
* Replace Map-based cache of query hashes with private property.
Should fix#26, since the hash can now be garbage collected whenever the
query object is collected, and query objects are no longer kept alive by
the calculated Map.
* Bump max bundle size to make Travis tests pass.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello guys !
I'm currently developing a GraphQL hub that serves as a proxy to many other GraphQL servers. These servers accept persisted queries and I thought it would be really nice to use this package for sending them hashed queries. However, after some time in production, my GraphQL hub started running out of memory. After much investigation, our team found out that this package was the evil of our memory leak.
The leak occurs because this package tries to optimize the query computation by using a
Map
as a cache, and this map grows indefinitely. leakMy fix proposal is to accept a cache implementation with the interface defined by apollo-server-caching so we can use the cache implementation that best fits our needs (with
Map
as the default value for this cache)What do you guys think ?
Thank you !
The text was updated successfully, but these errors were encountered: