Process Memory Vs Heap — JVM

后端 未结 3 1636
名媛妹妹
名媛妹妹 2020-12-09 05:58

We have a web application deployed on a tomcat server. There are certain scheduled jobs which we run, after which the heap memory peaks up and settles down,

3条回答
  •  轮回少年
    2020-12-09 06:40

    You can use -Xmx and -Xms settings to adjust the size of the heap. With tomcat you can set an environment variable before starting:

    export JAVA_OPTS=”-Xms256m -Xmx512m”
    

    This initially creates a heap of 256MB, with a max size of 512MB.

    Some more details: http://confluence.atlassian.com/display/CONF25/Fix+'Out+of+Memory'+errors+by+increasing+available+memory

提交回复
热议问题