-
Notifications
You must be signed in to change notification settings - Fork 105
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
IntrospectionQuery is causing huge memory consumption after the latest updates #959
Comments
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. |
Does the same behavior happen when you make a introspection query from e.g. curl while disabling brotli? We've got a suspicion that the brotli Middleware is responsible, which gets usually activated by browsers. |
OK, 50MB – router@0.95.1 Video of work using router@0.95.2 I haven't figured out how to disable brotli on this version, hint? I couldn't find it in the doc. I can cut it in the code if you tell me where) |
8d7f20a in cosmo increased memory consumption in this scenario |
Just in case. That PR #968 didn't solve the problem Since it seems to be consuming memory in graphql-go-tools/v2 |
Hi @flymedllva please retry the latest release. We did couple of optimizations. We will take a deeper look if it is still reproducible. Thank you. |
Hi @StarpTech, I tried router@0.99.1, the result is the same Please note my recent posts Screen.Recording.2024-07-30.at.16.56.59.mov |
Hi, thanks for the test. Could you attach your router config here or send me via dustin@wundergraph.com? Thank you! |
@flymedllva please send me your router config. https://cosmo-docs.wundergraph.com/cli/router/fetch |
Hi @StarpTech, sent it to your email dustin@wundergraph.com |
I tried #986, no introspection problems on it, thanks! |
Component(s)
router
Component version
0119c2d
wgc version
0.58.5
controlplane version
router version
0119c2d
What happened?
Description
After one of the recent Cosmo updates, there is an abnormal increase in memory consumption when calling
IntrospectionQuery
(e.g. in the Playground refresh button).Our schema (config.json), from which we get this result, weighs
13.7M
. On older versions of cosmo we didn't have this problem.Occurs after executing
err = t.loader.LoadGraphQLResponseData(ctx, response, t.resolvable)
inresolve.go
(wundergraph/graphql-go-tools/v2@v2.0.0-rc.63)Steps to Reproduce
Expected Result
Consume the normal amount of memory for this request)
Actual Result
Brutal memory consumption)
Screen.Recording.2024-07-24.at.17.51.02.mov
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") macOS / Linux
Package Manager: npm
Compiler(if manually compiled): go version go1.22.3 darwin/arm64
Router configuration
Router execution config
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: