Where to increase heap size - jboss or java?

Abhishek Singh :

I am working on a large java API service application (on linux machine and server - jboss-as-7.1) which is currently doing more than 100 000 e-kyc transactions per day. After 2-3 days the application crashes showing

out-of-memory - heap size error

I have done java profiling for memory leak and found no such code which may cause memory leak. So is it because of lots of transactions that my application needs to be assigned more heap memory? And if yes where should i change or set the heap memory size? jboss or jdk?

Nevin :

In Jboss/bin/run.conf, update Xms and Xmx parameters in JAVA_OPTS to required size. If you want to set min heap size to 1GB and max heap size to 2GB update Xms and Xmx as below

JAVA_OPTS="-Xms1024m -Xmx2048m <Other arguments>"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325164&siteId=1