zoukankan      html  css  js  c++  java
  • tomcat配置优化

    tomcat服务管理页面

    http://192.168.1.249:8080/manager/status

    找到下面的内容

    "http-nio-8081"  (此处端口是根据自己实际配置的

    Max threads: 1000 Current thread count: 100 Current thread busy: 8 Keeped alive sockets count: 0
    Max processing time: 1120 ms Processing time: 3753.783 s Request count: 56112 Error count: 0 Bytes received: 0.00 MB Bytes sent: 281.23 MB

    Current thread count: 100 这个参数则代表当前TOMCAT的并发访问量

    Max threads: 1000 这个参数则代表最大线程数

    server.xml优化内容如下:

     <Connector port="8080" protocol="HTTP/1.1"

                  connectionTimeout="20000"

    URIEncoding="UTF-8" 

    enableLookups="false"

    disableUploadTimeout="true"

    acceptCount="500"  

    maxThreads="500"

    seURIValidationHack="false"

                   redirectPort="8443" />

    参数说明:

    acceptCount:允许的最大连接数,满了之后客户请求会被拒绝,默认值为 100
    enableLookups:是否反查域名,取值为: true 或 false 。为了提高处理能力,应设置为 false
    connectionTimeout:网络连接超时,单位:毫秒。设置为 0 表示永不超时,这样设置有隐患的。通常可设置为 30000 毫秒。
    maxThreads  客户请求最大线程数
    enableLookups      若设为true, 则支持域名解析,可把 ip 地址解析为主机名
    redirectPort        在需要基于安全通道的场合,把客户请求转发到基于SSL 的 redirectPort 端口
    URIEncoding    URL统一编码


  • 相关阅读:
    课件的引子
    用nc做网络压力测试
    分布式计算学习笔记
    静态库 .a 转成共享库 .so
    nmon用法
    eclipse debug URLClassPath.getLoader(int) file
    sodu 命令场景分析
    俩孩随笔
    深度学习丨深度学习中GPU和显存分析
    语义分割丨DeepLab系列总结「v1、v2、v3、v3+」
  • 原文地址:https://www.cnblogs.com/shihaiming/p/5999948.html
Copyright © 2011-2022 走看看