How to increase heap size for jBoss server

前端 未结 9 1244
星月不相逢
星月不相逢 2020-12-31 05:14

I have an upload files scenario in my project. When I\'m trying to upload the large files it\'s giving me an OutOfMemory error. That error is related to Java heap size.

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 05:23

    Look in your JBoss bin folder for the file run.bat (run.sh on Unix)

    look for the line set JAVA_OPTS, (or just JAVA_OPTS on Unix) at the end of that line add -Xmx512m. Change the number to the amount of memory you want to allocate to JBoss.

    If you are using a custom script to start your jboss instance, you can add the set JAVA_OPTS option there as well.

提交回复
热议问题