1. 程式人生 > >出現Insufficient space for shared memory file的解決辦法

出現Insufficient space for shared memory file的解決辦法

今天早上,想改bug,但是發現專案的後臺進不去了,前臺也進不去了。於是第一時間想到的是檢視日誌資訊,但是發現日誌資訊一直沒有反應,想到可能是工程掛了,於是想當然的去重啟專案,但是出現了意象不到的錯誤。

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.

錯誤資訊主要是由於Insufficient space for shared memory file引起的,意思就是共享記憶體檔案的空間不足。
然後使用df檢視空間使用情況,發現使用率已經100%。
因為該伺服器目前只有這一工程,所以很容易的就想到,可能是日誌檔案過多引起的。
於是刪除了該專案下的部分無用過期的日誌,然後重啟專案,問題解決!