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

kit.PayloadUnaryServerInterceptor memory leakage #498

Closed
r3code opened this issue Jul 7, 2022 · 1 comment
Closed

kit.PayloadUnaryServerInterceptor memory leakage #498

r3code opened this issue Jul 7, 2022 · 1 comment

Comments

@r3code
Copy link
Contributor

r3code commented Jul 7, 2022

During work of an app, this code consumes memory without returning it, and it can cause Out of memory one day
https://github.com/grpc-ecosystem/go-grpc-middleware/blob/master/logging/kit/payload_interceptors.go#L34

r3code added a commit to r3code/go-grpc-middleware that referenced this issue Jul 12, 2022
r3code added a commit to tabby-ai/go-grpc-middleware that referenced this issue Jul 12, 2022
Closes issue grpc-ecosystem#498

A wrong assign creates multiple object for GC, and with every call appends new objects, so GC have to walk through thousands of objects. This causes high increasing memory and CPU usage. We saw in our services that it leads to CPU throttling and increasing of a memory usage.
r3code added a commit to tabby-ai/go-grpc-middleware that referenced this issue Jul 12, 2022
Closes issue grpc-ecosystem#498

A wrong assign creates multiple object for GC, and with every call appends new objects, so GC have to walk through thousands of objects. This causes high increasing memory and CPU usage. We saw in our services that it leads to CPU throttling and increasing of a memory usage.
r3code added a commit to tabby-ai/go-grpc-middleware that referenced this issue Jul 12, 2022
r3code added a commit to tabby-ai/go-grpc-middleware that referenced this issue Jul 12, 2022
Closes issue grpc-ecosystem#498

A wrong assign creates multiple object for GC, and with every call appends new objects, so GC have to walk through thousands of objects. This causes high increasing memory and CPU usage. We saw in our services that it leads to CPU throttling and increasing of a memory usage.
johanbrandhorst pushed a commit that referenced this issue Jul 14, 2022
* Fix memory leakage in kit.PayloadUnaryServerInterceptor


Closes issue #498

A wrong assign creates multiple object for GC, and with every call appends new objects, so GC have to walk through thousands of objects. This causes high increasing memory and CPU usage. We saw in our services that it leads to CPU throttling and increasing of a memory usage.

* Fix logging in PayloadUnaryServerInterceptor

Issue #498
@karelbilek
Copy link

This issue can be closed I think; it's merged into master

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

No branches or pull requests

3 participants