java run out of memory issue

前端 未结 6 2259
自闭症患者
自闭症患者 2021-01-04 13:13

I have a jar file running on an amazon-ec2-m1.large instance with linux 64bit operating system. I run out of memory after different hours, usually between 2-4, although in m

6条回答
  •  粉色の甜心
    2021-01-04 13:46

    If you have more physical ram available use that . It seems that the heap size allocated is only 1656 mb which perhaps is not enough. Try running java jar file with two switches -xmx4096mb and -xms 2048 Then monitor the usage , perhaps the memory requirement is too large for your application , if you still run out of memory after sometime then it needs further investigation to check if your code is leaking memory. Hope this helps , let me know if you need more clarification

提交回复
热议问题