How to increase Java heap space for a tomcat app

前端 未结 10 2398
攒了一身酷
攒了一身酷 2020-12-08 09:59

There are lots of questions that ask this or a similar question.

They all give the command that has to be executed, what I don\'t understand is where do I write this

10条回答
  •  一向
    一向 (楼主)
    2020-12-08 10:50

    You need to add the following lines in your catalina.sh file.

    export CATALINA_OPTS="-Xms512M -Xmx1024M"
    

    UPDATE : catalina.sh content clearly says -

    Do not set the variables in this script. Instead put them into a script setenv.sh in CATALINA_BASE/bin to keep your customizations separate.

    So you can add above in setenv.sh instead (create a file if it does not exist).

提交回复
热议问题