一次受限於操做系統進程數的OOM

在64bit機上跑應用,結果進程剛起來就掛,就剛起來就掛。。還OOM,還fork不出新進程,尼瑪,這什麼狀況?java

1. 若是是應用層面OOM,那麼不該該任何命令都不被執行了,不該該OS直接crash掉。bash

2. 那麼應該是OS自身的限制致使的。ulimit -a 看到限制的最大線程數是1024,這怎麼夠用,調大一點到1萬好了 ulimit -u 10000spa

 

$ jps
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create GC thread. Out of system resources.
# An error report file with more information is saved as:
# /home/admin/logs/hs_err_pid26989.log線程

 

-bash: fork: 資源暫時不可用
-bash: fork: retry: 資源暫時不可用
-bash: fork: retry: 資源暫時不可用

orm

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

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

Java HotSpot(TM) 64-Bit Server VM warning: Exception
java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to handler- the VM may need to be for
cibly terminatedci

 

 

 

 

 

>$ ulimit -a資源

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 79486
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 204800
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) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimitedit

相關文章
相關標籤/搜索