-
Notifications
You must be signed in to change notification settings - Fork 539
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
Secor is leaking memory through DeleteOnExit #785
Comments
We are getting the same problem - every few days secor crashes with identical Memory and CPu patterns. Filed under #964 |
any updates ? |
This is interesting. If you can reproduce the problem, can you turn on the debug logging category for FileRegistry.java which will prints out all the files added for deleteOnExit. It would be interesting to see why there will be so many files added, we have never seen the memory problem on DeleteOnExitHook before and DeleteOnExitHook doesn't have a method to clear the map either. One suspicion I have is the file size is set to too small (secor.max.file.size.bytes and secor.max.file.age.seconds) so it ends up creating too many files. |
I think I have the same problem. Any ideas on how to approach this problem? |
Looks good to me, I left a small comment in the code for backward compatible behavior. And I don't think we should sort the files since that would change the file uploading order, some people might not like that. |
@giner @dovka @yehoshoua Do you guys want to try #1443? |
Thank you Henry. Which release it will be available? |
I haven't cut any release yet since this PR is just landed. I think you can just pull that PR's classes into your local build to try it out, it's a very simple PR. I don't think it will affect the upload throughput since most of your files are probably small files and you can tune the upload threshold parameter. |
I'm wondering why using deleteOnExit at all? It could be fine if there was a limited number of files created during the process lifetime hover it's not the case with Secor and deleteOnExit doesn't release memory until the process is restarted. |
Yes, my change solves only one part of the problem, it helps to keep
that was enough for me, to keep secor running without OOM for now. It does not affect DeleteFileOnExit though. What is the idea behind DeleteOnExit tracking list of files? Wouldn't it be sufficient to delete all staged files on exit? Edit:* |
Secor is exhausting the while heap over time and either crashes or starts spinning due to GC trying to free memory very frequently. Memory is accumulated in the DeleteOnExitHook by DeleteOnExit method. We are running Secor v0.25 and the related code seems to be the same in the latest version (which is v0.27 at the moment of writing).
The text was updated successfully, but these errors were encountered: