I am getting following error while generating multiple clients in Apache Ignite using Jmeter. What should be heap size while launching Apache Ignite clients? I tried keeping it more than 512MB but I am still getting same error.
Nov 02, 2016 6:54:20 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Got exception while starting (will rollback startup routine).
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor.start(GridTimeoutProcessor.java:71)
at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1589)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:839)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1739)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1589)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516)
at org.apache.ignite.Ignition.start(Ignition.java:322)
at ignite_client_jmeter.runTest(ignite_client_jmeter.java:1404)
at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:196)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
at java.lang.Thread.run(Thread.java:745)
First of all, this error is not about heap memory, it indicates that you started more threads within one process that it's allowed by OS. On Linux you can play with ulimit
to overcome the issue.
Second of all, it looks like you're starting multiple clients within one JVM, which is a bad practice. Ignite
instance is thread-safe and can be used by multiple threads concurrently. So it's better to create a single client per JVM and then use it for all your interactions with the cluster.