I am getting an error Logstash - java.lang.OutOfMemoryError: Java heap space. However, I have changed the heap memory in the jvm.options file from 1g to 2g to 8g to 10g. I am still getting the same errors though. How can I find out how much heap space I need to use or am I supposed to make a different change in this or another file elsewhere.
how much memory your system has?
are you getting this error when you start or after a while
any other error messages on log files /var/log/messages or dmesg?
you can download free java debugger and find try. it will be long hard process if you do not know java (was for me)
For the error in the /var/log/elasticsearch I am getting a org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
The error also comes about after a while when the logstash has already been run successfully.
you got a post more error. more information
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:291) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:133) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:254) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:100) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.search.InitialSearchPhase.lambda$performPhaseOnShard$1(InitialSearchPhase.java:208) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.search.InitialSearchPhase$1.doRun(InitialSearchPhase.java:187) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.2.jar:6.7.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
something else. it says all shard are failed.
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid110004.hprof ...
Heap dump file created [1285291394 bytes in 9.087 secs]
warning: thread "[main]>worker0" terminated with exception (report_on_exception is true):
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapCharBuffer.(HeapCharBuffer.java:57)
at java.nio.CharBuffer.allocate(CharBuffer.java:335)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:795)
at java.nio.charset.Charset.decode(Charset.java:807)
at org.jruby.RubyEncoding.decodeUTF8(RubyEncoding.java:269)
at org.jruby.runtime.Helpers.decodeByteList(Helpers.java:2439)
at org.jruby.RubyString.decodeString(RubyString.java:797)
at org.jruby.RubyString.toJava(RubyString.java:6221)
at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:98)
at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:195)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:378)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:213)
at org.jruby.java.proxies.ConcreteJavaProxy$InitializeMethod.call(ConcreteJavaProxy.java:60)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:211)
at org.jruby.RubyClass.newInstance(RubyClass.java:997)
at org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrTwoOrNBlock.call(JavaMethod.java:353)
at org.jruby.java.proxies.ConcreteJavaProxy$NewMethod.call(ConcreteJavaProxy.java:165)
at java.lang.invoke.LambdaForm$DMH/1089407736.invokeVirtual_L7_L(LambdaForm$DMH)
at java.lang.invoke.LambdaForm$BMH/1063494931.reinvoke(LambdaForm$BMH)
at java.lang.invoke.LambdaForm$MH/1259769769.delegate(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/296954388.guard(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/1259769769.delegate(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/296954388.guard(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/621502043.linkToCallSite(LambdaForm$MH)
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.manticore_minus_0_dot_6_dot_4_minus_java.lib.manticore.client.RUBY$method$request_from_options$0(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.6.4-java/lib/manticore/client.rb:471)
at java.lang.invoke.LambdaForm$DMH/1436901839.invokeStatic_L9_L(LambdaForm$DMH)
at java.lang.invoke.LambdaForm$BMH/77334939.reinvoke(LambdaForm$BMH)
at java.lang.invoke.LambdaForm$MH/589835301.delegate(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/505567264.guard(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/589835301.delegate(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/505567264.guard(LambdaForm$MH)
Hi @edster,
it looks like the OutOfMemoryError happens in logstash. You probably want to take your discussion to the logstash forum:
what is your swap space look like command
#> free
in terms of g for free swap it is 7 and for Mem it is 9.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.