There is insufficient memory for the Java Runtime Environment to continue


There is insufficient memory for the Java Runtime Environment to continue.

Problem

環境:Linux VM_43_129_centos 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Architecture:          x86_64
CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 63 Model name: Intel(R) Xeon(R) CPU E5-26xx v3 Stepping: 2 CPU MHz: 2294.686 BogoMIPS: 4589.37 Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 4096K NUMA node0 CPU(s): 0,1
  • Tomcat 啟動報日志:

There is insufficient memory for the Java Runtime Environment to continue.

 

 

內存不夠用了!。?,可是,那可是31個G呀~

  • free -h 查看內存使用情況:

 

可用內存僅剩305M

分析是tomcat項目啟動太多

  • ps -ef |grep tomcat 查看Tomcat相關進程:

 

可以看到,Tomcat仍有多個進程在運行。

Solution

手動kill對應的pid,再次 free -h 查看內存使用情況:

 

可用內存瞬間恢復,嘗試啟動Tomcat,成功~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM