Unicorn Eating Memory

后端 未结 5 1716
执念已碎
执念已碎 2021-02-08 00:11

I have a m1.small instance in amazon with 8GB hard disk space on which my rails application runs. It runs smoothly for 2 weeks and after that it crashes saying the memory is ful

5条回答
  •  不知归路
    2021-02-08 00:13

    As Preston mentioned you don't have a memory problem (over 40% free), you have a disk full problem. du reports most of the storage is consumed in /root/data.

    You could use find to identify very large files, eg, the following will show all files under that dir greater than 100MB in size.

    sudo find /root/data -size +100M
    

    If unicorn is still running, lsof (LiSt Open Files) can show what files are in use by your running programs or by a specific set of processes (-p PID), eg:

    sudo lsof | awk  '$5 ~/REG/ && $7 > 100000000 { print }'
    

    will show you open files greater than 100MB in size

提交回复
热议问题