Insufficient space for shared memory file 解决办法

问题

服务器出现warning如下:

Java HotSpot(TM) 64-Bit Server VM warning: Insufficient space for shared memory file:
   /tmp/hsperfdata_work/10700
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

分析

提示共享内存文件空间不足,执行命令行:

df

可以看到:

Filesystem                                      1K-blocks  Used          Available  Use%  Mounted on
/dev/mapper/VolGroup01-LogVol00  49384248  49384248   0                 100%  /

目录使用率100%,但是这个只是逻辑卷,具体是由于/tmp目录下,日志文件太多,导致空间被占满了。

解决

执行命令:

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

查看大小超过100M的文件,发现在某文件夹下有许多大于100M的日志文件,进入该目录,删除一些日志文件,重启即可恢复正常。

原文地址:https://www.cnblogs.com/jayworld/p/11051048.html