Tomcat configuration recommendations_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > Tomcat configuration recommendations

Tomcat configuration recommendations

 2014/10/11 13:25:04  zhuzhiguosnail  程序员俱乐部  我要评论(0)
  • 摘要:ThistopicprovidessomeconfigurationtipsforgettingstartedwithyourTomcatapplicationserver.KeepinmindthatcompletedocumentationonconfiguringandusingtheTomcatserverisavailableatthisURLfortheserver:http://localhost
  • 标签:Tomcat

class="shortdesc">This topic provides some configuration tips for getting started with your Tomcat application server.

Keep in mind that complete documentation on configuring and using the Tomcat server is available at this URL for the server:?monospace;" class="ph filepath">http://localhost:8080/docs/

This topic provides some configuration tips that are specific to the Integrator ETL Server application.

Creating a setenv file

It is recommended that you create a file named?setenv.bat?(Windows) or?setenv.sh?(Linux) and place it in the Tomcat?bin?directory. With this file (which is run by the?catalina.bat?and?catalina.sh?scripts), you can change the following Tomcat environment settings with the?JAVA_OPTS?variable:
  • You can set the minimum and maximum memory heap size with the JVM?-Xms?and?-Xmx?parameters. The best limits depend on many conditions, such as transformations that Integrator ETL should execute. For Information Discovery transformations, a maximum of 1 GB is recommended. For example, to set the minimum heap size to 128 MB and the maximum heap size to 1024 MB, use:
    JAVA_OPTS="-Xms128m -Xmx1024m"
  • You should set the maximum limit of the PermGen (Permanent Generation) memory space to a size larger than the default. The default of 64 MB is not enough for enterprise applications. A suitable memory limit depends on various criteria, but 256 MB would make a good choice in most cases. If the PermGen space maximum is too low,?OutOfMemoryError: PermGen space?errors may occur. You can set the PermGen maximum limit with the following JVM parameter:
    -XX:MaxPermSize=256m
  • For performance reasons, it is recommended that the application is run in Server mode. Apache Tomcat does not run in Server mode by default. You can set the Server mode by using the JVM?-server?parameter. You can set the JVM parameter in the?JAVA_OPTS?variable in the environment variable in the?setenv?file.
The following is an example of a?setenv.bat?file:
set "JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx1024m -XX:MaxPermSize=256m -server"

About database connections

By default, Integrator ETL Server uses an embedded Apache Derby database. This database is suitable for testing and evaluation environments. In these environments, no additional configuration is necessary.

In production environments, use of the embedded Derby database is not recommended. In these environments, you should use a robust, production-quality database, such as an Oracle or MySQL database. For details about configuring these databases, see the?Integrator ETL Server Guide.

发表评论
用户名: 匿名