java.lang.OutOfMemoryError: unable to create new native thread

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Scala JIRA by eugene, 1 year ago
unable to create new native thread
via Oracle Community by 679224, 1 year ago
unable to create new native thread
via Stack Overflow by Laures
, 2 years ago
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:597)
at scala.concurrent.forkjoin.ForkJoinPool.createAndStartAddedWorkers(ForkJoinPool.java:524)
at scala.actors.scheduler.ForkJoinScheduler.makeNewPool(ForkJoinScheduler.scala:44)
at scala.actors.scheduler.ForkJoinScheduler.(ForkJoinScheduler.scala:15)
at scala.actors.scheduler.ForkJoinScheduler.(ForkJoinScheduler.scala:29)
at scala.actors.scheduler.ForkJoinScheduler.(ForkJoinScheduler.scala:33)
at scala.actors.scheduler.ForkJoinScheduler.(ForkJoinScheduler.scala:37)
at scala.actors.Scheduler$.makeNewScheduler(Scheduler.scala:33)
at scala.actors.scheduler.DelegatingScheduler$class.newActor(DelegatingScheduler.scala:63)
at scala.actors.Scheduler$.newActor(Scheduler.scala:21)
at scala.actors.Reactor$class.dostart(Reactor.scala:221)
at scala.actors.Actor$$anon$1.scala$actors$Actor$$super$dostart(Actor.scala:132)
at scala.actors.Actor$class.dostart(Actor.scala:709)
at scala.actors.Actor$$anon$1.dostart(Actor.scala:132)
at scala.actors.Reactor$class.start(Reactor.scala:230)
at scala.actors.Actor$$anon$1.scala$actors$Actor$$super$start(Actor.scala:132)
at scala.actors.Actor$class.start(Actor.scala:713)
at scala.actors.Actor$$anon$1.start(Actor.scala:132)
at scala.actors.Actor$.actor(Actor.scala:136)
at undefined.Main$$anon$1$$anonfun$isPerfectConcurrent$1.apply(testActor.scala:18)
at undefined.Main$$anon$1.isPerfectConcurrent(testActor.scala:14)
at undefined.Main$$anon$1.(testActor.scala:32)
at undefined.Main$.main(testActor.scala:1)
at undefined.Main.main(testActor.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:78)
at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:24)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:88)
at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:78)
at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
at scala.tools.nsc.ScriptRunner.scala$tools$nsc$ScriptRunner$$runCompiled(ScriptRunner.scala:171)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply$mcZ$sp(ScriptRunner.scala:157)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
at scala.tools.nsc.util.package$.waitingForThreads(package.scala:26)
at scala.tools.nsc.ScriptRunner.withCompiledScript(ScriptRunner.scala:130)
at scala.tools.nsc.ScriptRunner.runScript(ScriptRunner.scala:188)
at scala.tools.nsc.ScriptRunner.runScriptAndCatch(ScriptRunner.scala:201)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:58)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

Users with the same issue

10 times, 1 week ago
Once, 6 months ago
530 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 9 months ago
4 times, 11 months ago
59 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.