Closed flymedllva closed 1 month ago
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.
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 Memory running out, 10GB+ – router@0.95.2
Video of work using router@0.95.2 https://github.com/user-attachments/assets/ab57f1c7-f7ea-4a73-b801-e0cc927ec53e
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)
8d7f20a7f43c29a1a0e80510afb6e7c318fcd080 in cosmo increased memory consumption in this scenario
Just in case. That PR https://github.com/wundergraph/cosmo/pull/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
https://github.com/user-attachments/assets/26cd1c75-6b7c-4d78-ba00-88937fdd8665
Hi, thanks for the test. Could you attach your router config here or send me via dustin@wundergraph.com? Thank you!
Same on my side, 4gb has always be enough memory but since a few releases introspection has been failing and pods restarting:
The spikes timestamps match with introspection queries.
@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
@jensneuse @StarpTech
I tried https://github.com/wundergraph/cosmo/pull/986, no introspection problems on it, thanks!
Component(s)
router
Component version
0119c2d656674c07dde45372298a7b6ab625e70f
wgc version
0.58.5
controlplane version
-
router version
0119c2d656674c07dde45372298a7b6ab625e70f
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)
https://github.com/user-attachments/assets/4793a6be-76a3-4647-91e3-667967081b5d
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