1. 程式人生 > >LInux 中 tomcat 部署專案報 java 記憶體溢位問題Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0

LInux 中 tomcat 部署專案報 java 記憶體溢位問題Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0

如果你 重複關閉 啟動tomcat , 有時候會遇到 tomcat 啟動不起來

啟動程式報錯: 
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006fff80000, 2863661056, 0) failed; error=’Cannot allocate memory’ (errno=12) 
#

There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 2863661056 bytes for committing reserved memory. # An error report file with more information is saved as: # /home/raini/IdeaProjects/spark_mllib/hs_err_pid19206.log

記憶體不足: 減少啟動程式所需記憶體,或加大記憶體,如關閉一些程式。

 有時候  不是記憶體的問題

是 重複 開啟關閉 tomcat  原因造成的   java 程序沒有及時關閉

此時 使用 ps -ef|grep java 

檢視有多少個java程序

如果很多的話使用

pkill -9 java  殺死掉所有程序