博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Tomcat的优化
阅读量:2394 次
发布时间:2019-05-10

本文共 695 字,大约阅读时间需要 2 分钟。

Tomcat 建议解压到分区的根目录下并重命名为Tomcat,中间避免出现空格(某些程序对空格处理的不够好,容易出现空格被转换为%20的问题),修改 ${catalina_home}/conf/server.xml:
1)打开Executor结点的注释,并增大线程数量
<Executor
           name="tomcatThreadPool"
           namePrefix="catalina-exec-"
           maxThreads="100"
           minSpareThreads="100"/>
2)修改Connector结点,增加URIEncoding="utf-8"属性使所有http get请求默认使用utf-8方式解码,并增加executor="tomcatThreadPool"属性,使之前线程数量修改生效
<Connector
             executor="tomcatThreadPool"
             port="8080"
             protocol="HTTP/1.1"
             acceptCount="5000"
             connectionTimeout="60000"
             redirectPort="8443"
             URIEncoding="utf-8"
             enableLookups="false"
             disableUploadTimeout="true"
             maxHttpHeaderSize="8192"
             useBodyEncodingForURI="true"/>
3)在${catalina_home}新建bak目录,把${catalina_home}\webapps中的文件全部复制到${catalina_home}\bak目录下

转载地址:http://hngab.baihongyu.com/

你可能感兴趣的文章
Build self-healing distributed systems with Spring Cloud
查看>>
如何利用Spring Cloud构建起自我修复型分布式系统
查看>>
Java代码实现设置系统时间
查看>>
java -D参数简化加入多个jar
查看>>
用Erlang开发的文档数据库系统CouchDB
查看>>
Apache Commons工具集简介
查看>>
Apache Cayenne—辣椒你吃了吗?
查看>>
云应用开发工具:Spring Cloud 1.0 正式发布
查看>>
[转]在VC中使用智能指针操作Excel
查看>>
关于Linux命令行环境下无线网卡的配置
查看>>
C++的朋友,你都在用什么连数据库啊
查看>>
Setup Kubernetes on a Raspberry Pi Cluster easily the official way!
查看>>
Installing Kubernetes on Linux with kubeadm
查看>>
k8s-Building Large Clusters
查看>>
[转]stl 通用排序算法解析
查看>>
分布式存储系统GlusterFS初体验
查看>>
GlusterFS常用命令小结
查看>>
GlusterFS分布式文件系统使用简介
查看>>
Use Docker Engine plugins
查看>>
Using Gluster for a Distributed Docker Storage Volume
查看>>