Tomcat 启动报错,查看日志:
There is insufficient memory for the Java Runtime Environment to continue!

内存不够用了?
free -h 查看内存使用情况:

显示说明:
total——总物理内存 used——已使用内存,一般情况这个值会比较大,因为这个值包括了cache+应用程序使用的内存 free——完全未被使用的内存 shared——应用程序共享内存 buffers——缓存,主要用于目录方面,inode值等(ls大目录可看到这个值增加) cached——缓存,用于已打开的文件 note: total=used+free used=buffers+cached (maybe add shared also)
具体看看系统环境使用的情况吧!
top命令
top 命令查看系统的实时负载, 包括进程、CPU负载、内存使用等等;
直接输入top命令

下面表示整体信息


列表的含义

进入top的实时界面后,默认按照CPU的使用率排序,通过“shift+m”按键将进程按照内存使用情况排序,可以查看哪些进程是当前系统中的内存开销“大户”。
top命令中,按下 f 键,进入选择排序列的界面,这里可以选择要显示的信息列,要按照哪些信息列进行排序等
参照红框的说明来选择是否显示那些列就行,标*的就是显示

部分参考:https://www.cnblogs.com/Security-Darren/p/4685629.html
说明:内存已经不足了,尽可能的发挥它的最大价值,清理缓存吧。
释放缓存
释放缓存前同步
sync
释放所有缓存
echo 3 > /proc/sys/vm/drop_caches
释放缓存数字参数说明
-
0 – 不释放 -
1 – 释放页缓存 -
2 – 释放dentries和inodes -
3 – 释放所有缓存

成功释放380M的内存。 |