1、INFO: Maximum number of threads (200) created for connector with address null and port 80

说明:最大线程数错误

解决方案:

使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:

首先。打开/conf/server.xml,增加

  1. <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  2. maxThreads="" minSpareThreads="" maxIdleTime="" />

最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。

然后,修改<Connector ...>节点,增加executor属性,如:

  1. <Connector executor="tomcatThreadPool"
  2. port="" protocol="HTTP/1.1"
  3. connectionTimeout=""
  4. keepAliveTimeout=""
  5. maxKeepAliveRequests=""
  6. redirectPort=""

2、java.net.SocketException: Too many open files

当tomcat并发用户量大的时候,单个jvm进程确实可能打开过多的文件句柄。

使用 #lsof -p 10001|wc -l   查看文件操作数

如下操作:

  1. ().ps -ef |grep tomcat 查看tomcat的进程ID,记录ID号,假设进程ID10001
  2. ().lsof -p |wc -l 查看当前进程id10001 文件操作数
  3. ().使用命令:ulimit -a 查看每个用户允许打开的最大文件数
  4. 默认是1024.
  5. ().然后执行:ulimit -n 将允许的最大文件数调整为65536

来自:https://blog.csdn.net/ygd266/article/details/8255746

tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 80的更多相关文章

  1. tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080

    1.INFO: Maximum number of threads (200) created for connector with address null and port 8091 说明:最大线 ...

  2. tomcat调优方案Maximum number of threads (200) created for connector with address null and port 8091

    1.tomcat6大并发出现:INFO: Maximum number of threads (200) created for connector with address null and por ...

  3. 【POI】导出xls文件报错:The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook

    使用POI导出xls文件,由于数据过多,导致导出xls报错如下: The maximum number of cell styles was exceeded. You can define up t ...

  4. LeetCode 414 Third Maximum Number

    Problem: Given a non-empty array of integers, return the third maximum number in this array. If it d ...

  5. Failed to connect to database. Maximum number of conections to instance exceeded

    我们大体都知道ArcSDE的连接数有 48 的限制,很多人也知道这个参数可以修改,并且每种操作系统能支持的最大连接数是不同的. 如果应用报错:超出系统最大连接数 该如何处理? 两种解决办法: 第一,首 ...

  6. The maximum number of cell styles was exceeded. You can define up to 4000 styles

    POI操作Excel中,导出的数据不是很大时,则不会有问题,而数据很多或者比较多时, 就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面 ...

  7. iOS---The maximum number of apps for free development profiles has been reached.

    真机调试免费App ID出现的问题The maximum number of apps for free development profiles has been reached.免费应用程序调试最 ...

  8. [LeetCode] Third Maximum Number 第三大的数

    Given a non-empty array of integers, return the third maximum number in this array. If it does not e ...

  9. [LeetCode] Create Maximum Number 创建最大数

    Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum numb ...

随机推荐

  1. data.table包使用应该注意的一些细节

    fread中nThread 参数的使用   注意默认nThread=getDTthreads(),即使用所有能用的核心,但并不是核心用的越多越好,本人亲自测试的情况下,其实单核具有较强的性能,只有在数 ...

  2. SpringSecurity实现权限管理和页面导航栏动态实现

    用户模块. 3 1.1  需求:获取用户名. 3 1.1.1     分析. 3 1.1.2     服务端获取用户信息. 4 1.1.3     页面获取用户信息. 5 1.2  给用户分配角色. ...

  3. 网页开发--03(wampserver安装服务无法启动的问题)

    一.安装wampserver 一路next,指定安装路径外,其它默认安装. 二.我遇到的问题 当任务图标绿色为正常启动状态,但是我的从打开一直是黄色,问题在于Apache和MySql 1)Apache ...

  4. C 基于数组存储的堆栈实现

    一.堆栈简介 对于需要管理的队列,主要操作是在序列的末尾插入和取出(删除)元素,有这样操作要求的序列我们称之为堆栈(Stack). 堆栈可以认为是具有一定约束的线性表,插入和删除都作用在一个称为栈顶( ...

  5. [Swift]LeetCode36. 有效的数独 | Valid Sudoku

    Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to th ...

  6. [Swift]LeetCode847. 访问所有节点的最短路径 | Shortest Path Visiting All Nodes

    An undirected, connected graph of N nodes (labeled 0, 1, 2, ..., N-1) is given as graph. graph.lengt ...

  7. [Swift]LeetCode1011. 在 D 天内送达包裹的能力 | Capacity To Ship Packages Within D Days

    A conveyor belt has packages that must be shipped from one port to another within D days. The i-th p ...

  8. 【原创】一文掌握 Linux 性能分析之 I/O 篇

    本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. 一文掌握 Li ...

  9. Linux(2)---记录一次线上服务 CPU 100%的排查过程

    Linux(2)---记录一次线上服务 CPU 100%的排查过程 当时产生CPU飙升接近100%的原因是因为项目中的websocket时时断开又重连导致CPU飙升接近100% .如何排查的呢 是通过 ...

  10. redhat 6.5安装ansible

    安装epel 源: rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm 安装ansible ...