java 常见问题
Last updated on November 22, 2024 pm
🧙 Questions
☄️ Ideas
Uncaught error from thread [oms-akka.actor.internal-dispatcher-2]: unable to create new native thread, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[oms]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:717)
at java.util.concurrent.ForkJoinPool.createWorker(ForkJoinPool.java:1497)
at java.util.concurrent.ForkJoinPool.tryAddWorker(ForkJoinPool.java:1528)
at java.util.concurrent.ForkJoinPool.signalWork(ForkJoinPool.java:1645)
at java.util.concurrent.ForkJoinPool.externalPush(ForkJoinPool.java:2425)
at java.util.concurrent.ForkJoinPool.execute(ForkJoinPool.java:2641)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinPool.execute(ForkJoinExecutorConfigurator.scala:31)
at akka.dispatch.ExecutorServiceDelegate.execute(ThreadPoolBuilder.scala:218)
at akka.dispatch.ExecutorServiceDelegate.execute$(ThreadPoolBuilder.scala:218)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.execute(Dispatcher.scala:42)
at akka.dispatch.Dispatcher.registerForExecution(Dispatcher.scala:126)
at akka.dispatch.MessageDispatcher.attach(AbstractDispatcher.scala:146)
at akka.actor.dungeon.Dispatch.start(Dispatch.scala:116)
at akka.actor.dungeon.Dispatch.start$(Dispatch.scala:114)
at akka.actor.ActorCell.start(ActorCell.scala:408)
at akka.actor.LocalActorRef.start(ActorRef.scala:349)
at akka.actor.dungeon.Children.makeChild(Children.scala:317)
at akka.actor.dungeon.Children.actorOf(Children.scala:45)
at akka.actor.dungeon.Children.actorOf$(Children.scala:44)
at akka.actor.ActorCell.actorOf(ActorCell.scala:408)
at akka.routing.Pool.newRoutee(RouterConfig.scala:202)
at akka.routing.Pool.newRoutee$(RouterConfig.scala:201)
at akka.routing.RoundRobinPool.newRoutee(RoundRobin.scala:71)
at akka.routing.RoutedActorCell.$anonfun$start$1(RoutedActorCell.scala:113)
at scala.collection.generic.GenTraversableFactory.fill(GenTraversableFactory.scala:92)
at akka.routing.RoutedActorCell.start(RoutedActorCell.scala:113)
at akka.routing.RoutedActorCell.start(RoutedActorCell.scala:40)
at akka.actor.RepointableActorRef.point(RepointableActorRef.scala:111)
at akka.actor.ActorCell.handleSupervise(ActorCell.scala:681)
at akka.actor.ActorCell.supervise(ActorCell.scala:667)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:516)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:531)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:294)
at akka.dispatch.Mailbox.run(Mailbox.scala:229)
at akka.dispatch.Mailbox.exec(Mailbox.scala:242)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1067)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1703)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:172)
# 当前用户线程数不够
# 查询当前用户可申请最大线程数
ulimit -a
ulimit -u
# 当前用户线程数
pstree -p | wc -l
# 查询某个用户使用的线程数
pstree -p `ps -e | grep ispong| awk '{print $1}'` | wc -l
# 查看线程数情况
top -H
# 查询进程pid下面的进程
top -H -p 16457
# 查看僵尸进程
ps -ef
ulimit -n 65536
# 设置线程数
echo 1000000 > /proc/sys/kernel/pid_max
🔗 Links
java 常见问题
https://ispong.isxcode.com/spring/java/java 常见问题/