How to increase Java heap space for a tomcat app

前端 未结 10 2406
攒了一身酷
攒了一身酷 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 11:04

    Your change may well be working. Does your application need a lot of memory - the stack trace shows some Image related features.

    I'm guessing that the error either happens right away, with a large file, or happens later after several requests.

    If the error happens right away, then you can increase memory still further, or investigate find out why so much memory is needed for one file.

    If the error happens after several requests, then you could have a memory leak - where objects are not being reclaimed by the garbage collector. Using a tool like JProfiler can help you monitor how much memory is being used by your VM and can help you see what is using that memory and why objects are not being reclaimed by the garbage collector.

提交回复
热议问题