MyEclipse Start Tomcat memory overflow, or tomcat memory overflow problem Resolution __TOMCAT

Source: Internet
Author: User

In the recent project development, always encounter the startup project back to the memory overflow, first we have to identify the problem, MyEclipse boot Tomcat ignores catalina.bat to set the memory size, so if you start the Tomcat memory overflow with MyEclipse, and Tomcat starts without error, it must be myeclipse configuration problem, the solution is as follows:

Because the author uses Myeclipse10, Tomcat 6, so with MyEclipse10, tomcat6 as an example, click on the Top MyEclipse toolbar window--> Preference, and then click on MyEclipse- > Servers--> tomcat--> Tomcat 6.x--> JDK, then set the following information in optional Java VM arguments:

-server-xms512m-xmx512m-xx:permsize=256m-xx:maxpermsize=256m

Click Apply and click OK. OK, restart the project.


If you start the Tomcat memory overflow directly, you need to manually set the JVM memory size.

        Linux to modify the JVM memory size:

To add the catalina.sh in the Tomcat bin, position cygwin= False before.

# OS specific support.  $var _must_ is set to either True or false.
java_opts= "-xms256m-xmx512m-xss1024k-xx:permsize=128m-xx:maxpermsize=256m"
Cygwin=false



To modify the JVM memory size under windows:

Case one: Extract version of Tomcat to load configuration via Startup.bat boot tomcat

To be added under Tomcat's bin in Catalina.bat

REM Guess catalina_home if not defined
The set current_dir=%cd% is added after the red ones are added for the new.

Set Java_opts=-xms256m-xmx512m-xx:permsize=128m-xx:maxnewsize=256m-xx:maxpermsize=256m-djava.awt.headless=true



Situation Two: Install version of Tomcat under no Catalina.bat

The Windows service executes Bin\tomcat.exe. He reads the values in the registry, not the Catalina.bat settings.

Modify Registry Hkey_local_machine\software\apache SOFTWARE Foundation\tomcat Service manager\tomcat5\parameters\javaoptions
The original value is
-dcatalina.home= "C:\ApacheGroup\Tomcat 5.0"
-djava.endorsed.dirs= "C:\ApacheGroup\Tomcat 5.0\common\endorsed"
-xrs
Join-xms300m-xmx350m
Restart the Tomcat service and the settings take effect.


A simple analysis of the problem, please see the next article "Tomcat memory Overflow problem simple analysis"

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.