1.merchant_center(tomcat)
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<Connector port="8001" protocol="HTTP/1.1"
maxThreads="600" connectionTimeout="20000"
enableLookups="false" compression="on"
URIEncoding="UTF-8" useBodyEncodingForURI="true"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,application/json"
redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="access" suffix=".log"
pattern="%{X-Real-IP}i %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" "%{QunarGlobal}c" %h %{X-Forwarded-For}i"
resolveHosts="false"/>
</Host>
</Engine>
</Service>
</Server>
2.menpad
java -server -Xmx512m -Xms512m -Xss512k -XX:CompressedClassSpaceSize=128m -XX:ParallelGCThreads=2 -XX:+UseG1GC -XX:MaxGCPauseMillis=200\
-XX:InitiatingHeapOccupancyPercent=45 -XX:NewRatio=2 -XX:SurvivorRatio=8 -XX:-HeapDumpOnOutOfMemoryError\
-XX:HeapDumpPath=/data/logs/jvm/oom_dump.log -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 /data/service/wechat-jar/wechat_applet_api.jar \
--spring.profiles.active=dev>/data/service/wechat-jar/log-start.out &
本文详细介绍了Tomcat服务器的配置参数,包括连接器设置、线程池管理及主机配置,同时展示了Java服务的内存分配、垃圾回收策略与监控选项,为优化应用性能提供了实用指南。

被折叠的 条评论
为什么被折叠?



