-
Notifications
You must be signed in to change notification settings - Fork 199
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
The embulk process sometime throw java.lang.OutOfMemoryError: Metaspace When Plugin throw exception #1567
Comments
Thanks for investigating and reporting here! I'll have a deeper look. I intend to fix it in v0.10.44, or next v0.10.45. |
Looked into the history. I see that they used different Then, unfortunately, I don't think it's an easy and quick choice to reuse Instead, let me share some options :
|
@legiangthanh btw, when it happened, did you see log messages like If you saw it many times, it means that plugin classes were loaded duplicated, and that's the main problem to be addressed, not just |
@dmikurube, I can see this log message show when cleanup if the plugin throws an exception, here is an example
If the plugin can finish normally, OOM is not happen
|
Base on my test, this issue more likely happens when using a ruby plugin, when I switch to the maven plugin, although the class is reloaded, OOM don't happen
|
Hello, @legiangthanh Thank you for reporting this issue.
If you provide sample data for this issue, I'll try to reproduce it in my environment. |
Hi @hiroyuki-sato,
I am using Jruby 9.1.15.0
Not yet, let me try it.
Not yet. The reason I use the S3 input and output plugin because base on my investigation When the plugin throws an exception, the cleaned-up code will reload classes because Embulk creates a new ExecSessionInternal (embulk/EmbulkEmbed.java at master · embulk/embulk ). If these plugins contain multiple classes, OOM metaspace will more likely happen.
Configuration file
The purchase field in the last row contains invalid data. S3 input plugin will throw an exception when processing this row. |
Issue Type: Bug Report
The embulk process sometimes throws
java.lang.OutOfMemoryError: Metaspace
When Plugin throws an exception.Based on my investigation this OOM issue happened because Metaspace is used up (in our case we configure 128MB for metaspace) when the failure job is cleaned up.
When the failure job is cleaned up, Classes will be reloaded by another class loader because Embulk creates a new ExecSessionInternal (embulk/EmbulkEmbed.java at master · embulk/embulk ). If the number of class in plugins are large, OOM will be more happening.
Can we reuse
ExecSessionInternal
instead of creating a new one?The text was updated successfully, but these errors were encountered: