Imap Input - Java OutOfMemoryError

Hi there,
i am trying to import about ~1000 Mails from my Inbox. I marked the first e-mail as unread, got the UID and activated uid_tracking.

The first ~60 mails got fetched like intended. I don't think it's my configuration. I am running ELK in 3 separate Docker Containers (WSL 2 based engine).

Here is the error:

[2021-07-04T04:48:02,512][INFO ][logstash.javapipeline    ][.monitoring-logstash] Pipeline Java execution initialization time {"seconds"=>1.19}
[2021-07-04T04:48:02,595][INFO ][logstash.javapipeline    ][main] Pipeline Java execution initialization time {"seconds"=>1.3}
[2021-07-04T04:48:02,648][INFO ][logstash.javapipeline    ][.monitoring-logstash] Pipeline started {"pipeline.id"=>".monitoring-logstash"}
[2021-07-04T04:48:03,671][INFO ][logstash.inputs.imap     ][main] Using "sincedb_path": "PATH/plugins/inputs/imap/.sincedb_505a38a57d24aedc230285741f825803"
[2021-07-04T04:48:03,675][INFO ][logstash.inputs.imap     ][main] Loading "uid_last_value": "29660"
[2021-07-04T04:48:03,679][INFO ][logstash.javapipeline    ][main] Pipeline started {"pipeline.id"=>"main"}
[2021-07-04T04:48:03,740][INFO ][logstash.agent           ] Pipelines running {:count=>2, :running_pipelines=>[:".monitoring-logstash", :main], :non_running_pipelines=>[]}
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid1535.hprof ...
Heap dump file created [313120976 bytes in 1.964 secs]
[2021-07-04T04:48:20,181][INFO ][logstash.inputs.imap     ][main][d8294687d3d46ce314eaad3003df7e04276c170499b8ca3f2ee9b48d0de22805] Saving "uid_last_value": "29660"
warning: thread "[main]<imap" terminated with exception (report_on_exception is true):
java.lang.OutOfMemoryError: Java heap space
        at org.jruby.util.ByteList.<init>(ByteList.java:93)
        at org.jruby.RubyString.newStringLight(RubyString.java:461)
        at org.jruby.util.io.EncodingUtils.strTranscode0(EncodingUtils.java:932)
        at org.jruby.util.io.EncodingUtils.strTranscode(EncodingUtils.java:860)
        at org.jruby.util.io.EncodingUtils.strEncode(EncodingUtils.java:832)
        at org.jruby.RubyString.encode(RubyString.java:6230)
        at org.jruby.RubyString$INVOKER$i$encode.call(RubyString$INVOKER$i$encode.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:835)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x00000001007ad040.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x00000001007ad440.linkToCallSite(LambdaForm$MH)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb:253)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb)
        at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
        at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb:1998)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb)
        at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
        at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder)
warning: thread "Ruby-0-Thread-38: :1" terminated with exception (report_on_exception is true):
java.lang.OutOfMemoryError: Java heap space
        at org.jruby.util.ByteList.<init>(ByteList.java:93)
        at org.jruby.RubyString.newStringLight(RubyString.java:461)
        at org.jruby.util.io.EncodingUtils.strTranscode0(EncodingUtils.java:932)
        at org.jruby.util.io.EncodingUtils.strTranscode(EncodingUtils.java:860)
        at org.jruby.util.io.EncodingUtils.strEncode(EncodingUtils.java:832)
        at org.jruby.RubyString.encode(RubyString.java:6230)
        at org.jruby.RubyString$INVOKER$i$encode.call(RubyString$INVOKER$i$encode.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:835)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x00000001007ad040.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x00000001007ad440.linkToCallSite(LambdaForm$MH)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb:253)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb)
        at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
        at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb:1998)
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb)
        at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
        at java.base/java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH)
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70)
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207)
        at java.base/java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH)
        at java.base/java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH)
        at java.base/java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder)
[2021-07-04T04:48:20,300][FATAL][org.logstash.Logstash    ]
java.lang.OutOfMemoryError: Java heap space
        at org.jruby.util.ByteList.<init>(ByteList.java:93) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.RubyString.newStringLight(RubyString.java:461) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.util.io.EncodingUtils.strTranscode0(EncodingUtils.java:932) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.util.io.EncodingUtils.strTranscode(EncodingUtils.java:860) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.util.io.EncodingUtils.strEncode(EncodingUtils.java:832) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.RubyString.encode(RubyString.java:6230) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.RubyString$INVOKER$i$encode.call(RubyString$INVOKER$i$encode.gen) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:835) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207) ~[jruby-complete-9.2.16.0.jar:?]
        at java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000001007ad040.invoke(LambdaForm$MH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000001007ad440.linkToCallSite(LambdaForm$MH) ~[?:?]
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb:253) ~[?:?]
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.utilities.RUBY$method$to_crlf$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/utilities.rb) ~[?:?]
        at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207) ~[jruby-complete-9.2.16.0.jar:?]
        at java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH) ~[?:?]
        at java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder) ~[?:?]
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb:1998) ~[?:?]
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.mail_minus_2_dot_6_dot_6.lib.mail.message.RUBY$method$raw_source=$0$__VARARGS__(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/mail-2.6.6/lib/mail/message.rb) ~[?:?]
        at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x0000000100733440.invokeExact_MT(LambdaForm$MH) ~[?:?]
        at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:80) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:70) ~[jruby-complete-9.2.16.0.jar:?]
        at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:207) ~[jruby-complete-9.2.16.0.jar:?]
        at java.lang.invoke.LambdaForm$DMH/0x0000000100759840.invokeVirtual(LambdaForm$DMH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x000000010075b440.invoke(LambdaForm$MH) ~[?:?]
        at java.lang.invoke.Invokers$Holder.linkToCallSite(Invokers$Holder) ~[?:?]

Unfortunately I couldn't find a solution for it by myself (or in the forum).

Kind Regards
Marvin

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.