Tomcat Linux bugs

Source: Internet
Author: User

When Tomcat is started, the following message is displayed: Error occurred during initialization of VM Cocould not reserve enough space for object heap In the bin directory of Tomcat, Catalina. the Tomcat memory parameter configuration in the sh file is too large and exceeds the total available memory of the machine. modify it to the appropriate value. The modified parameter is java_opts = "-xms50m-xmx60m"


To obtain the maximum memory parameter value:
Run the Java-xmxxxxxm-version command on the command line to test the function. Then, the XXXX value is gradually increased. If the execution is normal, the specified memory size is available. Otherwise, the error message is printed. "Error occurred during initialization of vmcocould not reserve enough space for object Heap"

I ran Tomcat all the time yesterday. This morning, I found that all the web pages that passed the test yesterday had problems. The instinct was that Tomcat had problems and simply restarted tomcat.

Then the problem occurs. When Tomcat is closed, "error occured during initialization of VM. cocould not reserve enough space for object heap." appears. At the same time, Tomcat cannot be closed normally.

After searching, modify the bin/Catalina. Sh script and add the followingCode:

Java_opts = "-server-xms256m-xmx1024m-XX: permsize = 600 m-XX: maxpermsize = 600 m-DCOM. Sun. Management. jmxremote"

Run bin/shutdown. Sh to close Tomcat normally.

Related Article

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.