Tomcat 内存和远程调试

// tomcat 使用1g内存,修改 catalina.bat 文件如下

  if not "%JPDA%" == "" goto doJpda
  if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
  %_EXECJAVA% %JAVA_OPTS% -Xms1024m -Xmx1024m %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
  goto end
  :doSecurity
  %_EXECJAVA% %JAVA_OPTS% -Xms1024m -Xmx1024m %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
  goto end
  :doJpda
  if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
  %_EXECJAVA% %JAVA_OPTS% -Xms1024m -Xmx1024m %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
  goto end
  :doSecurityJpda
  %_EXECJAVA% %JAVA_OPTS% -Xms1024m -Xmx1024m %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
  goto end


// tomcat 连接数:修改 server.xml 文件如下

   <Connector
   port="80"  maxThreads="500" minSpareThreads="150" maxSpareThreads="150"
               enableLookups="false" redirectPort="8443" acceptCount="1000"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />

// tomcat 远程调试

   set JPDA=jpda
   set JPDA_TRANSPORT=dt_socket
   set JPDA_ADDRESS=8000
         
// eclipse内增大内存启动tomcat
        
   window->preferences->myeclipse->application server->tomcat 5->jdk->optional java jvm arguments里加 -Xms128m -Xmx200m 
  

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值