gpt4 book ai didi

java.lang.OutOfMemory错误: unable to create new native thread while starting wildfly

转载 作者:行者123 更新时间:2023-12-01 11:24:09 25 4
gpt4 key购买 nike

我想在我的虚拟服务器上启动一个wildfly。每次我运行 ./wildfly/bin/standalone.sh 时,引导时都会出现以下错误:

MSC000001: Failed to start service jboss.ironjacamar.idle-remover: org.jboss.msc.service.StartException in service jboss.ironjacamar.idle-remover: java.lang.OutOfMemoryError: unable to create new native thread
at org.jboss.as.connector.subsystems.jca.IdleRemoverService.start(IdleRemoverService.java:53)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) [rt.jar:1.8.0_45]
at java.lang.Thread.start(Thread.java:714) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1357) [rt.jar:1.8.0_45]
at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:668) [rt.jar:1.8.0_45]
at org.jboss.jca.core.connectionmanager.pool.idle.IdleRemover.start(IdleRemover.java:137)
at org.jboss.as.connector.subsystems.jca.IdleRemoverService.start(IdleRemoverService.java:51)
... 5 more

ulimit -a 得到以下结果:

core file size          (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 385262
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 385262
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

如您所见,虚拟内存是无限的,并且最大用户进程非常大。
当启动 jvm 时,我还使用 -Xss256kb 增加/减少了堆栈大小,如 in this post 中所述。但没有任何成功。
另外,在standalone.xml 中将每个子系统的 max-threads 增加 50 也不起作用(如 in this post 所述)。
您还有其他想法如何解决这个问题吗?

Java版本是

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

最佳答案

要修复 OutOfMemoryError,请使用 -Xmx2048m 开关启动 Java 进程。

希望这有帮助。

关于java.lang.OutOfMemory错误: unable to create new native thread while starting wildfly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30961403/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com