Closed GiedriusS closed 2 years ago
https://github.com/thanos-community/promql-engine/blob/8e5169a06e7c1012fd2e3cf8785ac0850452c02f/engine/engine.go#L190 sounds like we should always cancel this context but we don't for some reason?
I also think this is the culprit. We used to have it here: https://github.com/thanos-community/promql-engine/pull/83/files#diff-943d2c24d27405c73a2fe762aa3a28660ef3157100e46ab70defc5267fdb796bL44 but I think that PR removed it.
cc @bwplotka
https://github.com/thanos-community/promql-engine/pull/94 I added a fix here, at least it fixes this particular case :smile: I see no reason not to always cancel the context at the end of execution.
Here's how memory consumption looks like with the engine on the latest commit. 40k+ (and growing) goroutines are stuck on:
Full goroutine dump: promql_engine.txt