Reputation: 4277
I read many posts on the internet and here on stackoverflow, but I'm still not able to increase Tomcat Heap Size. Probably I made an error that I can't recognize.
Following this guide I did these steps:
When I run Tomcat and then I launch my app (for instance localhost:8080/appName) and I try to know the heap informations this way:
long maxHeapSize = Runtime.getRuntime().maxMemory();
long freeHeapSize = Runtime.getRuntime().freeMemory();
long totalHeapSize = Runtime.getRuntime().totalMemory();
System.out.println("Max Heap Size = " + (maxHeapSize/1024/1024)+ " MB");
System.out.println("Free Heap Size = " + (freeHeapSize/1024/1024)+ " MB");
System.out.println("Total Heap Size = " + (totalHeapSize/1024/1024)+ " MB");
I get that the Max Heap Size is always 256 MB. Does anybody know what's my error?
Upvotes: 0
Views: 24200
Reputation: 101
Please see detail:
If you want start Tomcat9w.exe, you need install service
Upvotes: 4
Reputation: 101
Please set in catalina.bat file: Screen shot of catalina.bat file
Upvotes: 0