情况
线上的web项目css等样式突然失效,加载不出来。
想重新启动但是报错Insufficient space for shared memory file。
Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file

原因分析
根据排查是服务器的资源不足

解决方式
使用命令

df

输出如下:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 10189112 10172724 0 100% /
tmpfs 870496 68 870428 1% /dev/shm

发现硬盘使用率100%

使用命令

find / -size +100M -exec ls -lh {} \;

查看大小超过100M的文件,然后进入目录,删除一些超大的可删的日志文件,然后重启tomcat,一切恢复正常。