Low Start Tomcat memory

Source: Internet
Author: User


Question: The following figure



Solution:

Adjusts tomcat initialization and maximizes memory data.

1. Query the local memory and usage, according to the actual situation to set, using the free command, according to B display, the following command by M and G respectively to display



According to the above see free only 1.7G available, and for some reason Tomcat set 4048M, so prompted the above error.


2. Modify CATALINA.SH Configuration


3. The java_opts value in the modification is:

Java_opts= "-server-xms512m-xmx1024m-xss1024k-xx:permsize=256m-xx:maxpermsize=512m"


4. Restart Tomcat.

./start.sh


Each parameter in the java_opts above explains:

-xms128m JVM Initial allocation of heap memory
-xmx512m JVM Maximum allowable allocation of heap memory, on demand
-xx:permsize=64m JVM Initial allocation of non-heap memory
-xx:maxpermsize=128m JVM Maximum allowable allocation of non heap memory, on demand



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.