tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 80
1、INFO: Maximum number of threads (200) created for connector with address null and port 80
说明:最大线程数错误
解决方案:
使用线程池,用较少的线程处理较多的访问,可以提高tomcat处理请求的能力。使用方式:
首先。打开/conf/server.xml,增加
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="" minSpareThreads="" maxIdleTime="" />
最大线程500(一般服务器足以),最小空闲线程数20,线程最大空闲时间60秒。
然后,修改<Connector ...>节点,增加executor属性,如:
<Connector executor="tomcatThreadPool"
port="" protocol="HTTP/1.1"
connectionTimeout=""
keepAliveTimeout=""
maxKeepAliveRequests=""
redirectPort=""
2、java.net.SocketException: Too many open files
当tomcat并发用户量大的时候,单个jvm进程确实可能打开过多的文件句柄。
使用 #lsof -p 10001|wc -l 查看文件操作数
如下操作:
().ps -ef |grep tomcat 查看tomcat的进程ID,记录ID号,假设进程ID为10001
().lsof -p |wc -l 查看当前进程id为10001的 文件操作数
().使用命令:ulimit -a 查看每个用户允许打开的最大文件数
默认是1024.
().然后执行: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的更多相关文章
- 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 说明:最大线 ...
- 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 ...
- 【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 ...
- LeetCode 414 Third Maximum Number
Problem: Given a non-empty array of integers, return the third maximum number in this array. If it d ...
- Failed to connect to database. Maximum number of conections to instance exceeded
我们大体都知道ArcSDE的连接数有 48 的限制,很多人也知道这个参数可以修改,并且每种操作系统能支持的最大连接数是不同的. 如果应用报错:超出系统最大连接数 该如何处理? 两种解决办法: 第一,首 ...
- The maximum number of cell styles was exceeded. You can define up to 4000 styles
POI操作Excel中,导出的数据不是很大时,则不会有问题,而数据很多或者比较多时, 就会报以下的错误,是由于cell styles太多create造成,故一般可以把cellstyle设置放到循环外面 ...
- 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.免费应用程序调试最 ...
- [LeetCode] Third Maximum Number 第三大的数
Given a non-empty array of integers, return the third maximum number in this array. If it does not e ...
- [LeetCode] Create Maximum Number 创建最大数
Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum numb ...
随机推荐
- 【转】Python+opencv利用sobel进行边缘检测(细节讲解)
#! usr/bin/env python # coding:utf-8 # 2018年7月2日06:48:35 # 2018年7月2日23:11:59 import cv2 import numpy ...
- js的七大设计原则--迪米特原则
一.什么是迪米特原则 迪米特原则也叫最少知道原则,一个类应该对其他对象保持最少的了解.通俗来讲,就是一个类对自己依赖的类知道的越少越好.因为类与类之间的关系越密切,耦合度越大,当一个类发生改变时,对另 ...
- go语言指针理解
- C#转发Post请求,包括参数和文件
/// <summary> /// 转发Post请求 /// </summary> /// <param name="curRequest">要 ...
- HTML块元素,行内元素,类,头部元素
总结HTML块元素,行内元素,类,头部元素 块元素: 在HTML中,块级元素的高度为其内容的高度,宽度会扩展到与父容器同宽.默认情况下,块级元素会独占一行,并且元素前后行留空. 示例:<h1&g ...
- gradle环境变量设置_配置注意事项
看<Spring源码深度解析>的时候,在windows7系统中按照书里配置gradle环境变量,配置完后输入gradle -v,一直显示:'gradle'不是内部或外部命令,也不是可执行的 ...
- js中的单例模式
1.场景:当我们需要多人合作完成一个项目,但是有一些操作是同样的操作时(例如:点击按钮显示加载的遮罩层:例如:提交表单时的验证都是一样的),这个时候我们就需要单例模式: 2.什么是单例模式:是一种常见 ...
- CMS使用对应版本当作新项目。
document.form1 整体替换document.forms[0] document.Templetslist 整体替换document.forms[0] document.f_Upload整体 ...
- MySQL表添加自增列
mysql> create table zc_test2(id int); Query OK, rows affected (1.37 sec) mysql),(),(),(),(); Quer ...
- 256.Spring Boot+Spring Security: MD5是加密算法吗?
说明 (1)JDK版本:1.8 (2)Spring Boot 2.0.6 (3)Spring Security 5.0.9 (4)Spring Data JPA 2.0.11.RELEASE (5)h ...