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

Possible Memory Leak #1074

Closed
jtannas opened this issue Sep 14, 2023 · 4 comments
Closed

Possible Memory Leak #1074

jtannas opened this issue Sep 14, 2023 · 4 comments

Comments

@jtannas
Copy link

jtannas commented Sep 14, 2023

Hello,
We recently had some OOM errors in our system.
Looking back on our metrics, it seems like the GoodJob runners have a significant memory leak.
Here's a graph of the memory usage over the last few months, with each of the dropoffs corresponding to deploying a new version of our application.
image

The leak rate appears to be ~150MB per day.
Thoughts?

@bensheldon
Copy link
Owner

That looks bad! 😬 ...but I don't imagine that it's specifically GoodJob; I haven't experienced that or seen it reported before (though someone does have to be first).

I'm imagining that the cause is one or more of your application's jobs that are allocating/retaining objects, and not specifically the GoodJob framework.

My recommendation would be to do some memory profiling around jobs. There's a lot of resources on using tools like MemoryProfiler or DerailedBenchmarks to profile them. Here's an example: https://blog.appsignal.com/2022/08/10/a-deep-dive-into-memory-leaks-in-ruby.html

@jtannas
Copy link
Author

jtannas commented Sep 18, 2023

Will do :)
I assumed it was Goodjob due to not seeing the same pattern in our API, but I'll work on narrowing it down to something specific since no else is reporting the issue.

@jtannas jtannas closed this as completed Sep 18, 2023
@mengqing
Copy link

Hi @jtannas, just wondering if you have found anything that might have caused the memory leak? I, too is having memory leak issue and is having difficulty tracking it down

@jtannas
Copy link
Author

jtannas commented Dec 19, 2023

@mengqing
There was some smaller stuff from us performing very large queries and the objects not being deallocated, but unfortunately we're still looking for the primary cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants