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

说明:最大线程数错误

解决方案:

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

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

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

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

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

  1. <Connector executor="tomcatThreadPool"
  2. port="80" protocol="HTTP/1.1"
  3. connectionTimeout="60000"
  4. keepAliveTimeout="15000"
  5. maxKeepAliveRequests="1"
  6. redirectPort="443"
  7. ....../>
<Connector executor="tomcatThreadPool"
port="80" protocol="HTTP/1.1"
connectionTimeout="60000"
keepAliveTimeout="15000"
maxKeepAliveRequests="1"
redirectPort="443"
....../>

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

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

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

如下操作:

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

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

  1. 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 说明:最大线程数 ...

  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. The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured

    springboot 8080端口被占用报错:The Tomcat connector configured to listen on port 8080 failed to start. The p ...

  4. 【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 ...

  5. LeetCode 414 Third Maximum Number

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

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

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

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

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

  8. 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.免费应用程序调试最 ...

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

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

随机推荐

  1. JS写四个图片滚动显示的效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. [转载]对于GetBuffer() 与 ReleaseBuffer() 的一些分析

    先 转载一段别人的文章 CString类的这几个函数, 一直在用, 但总感觉理解的不够透彻, 不时还有用错的现象. 今天抽时间和Nico一起分析了一下, 算是拨开了云雾: GetBuffer和Rele ...

  3. ArcEngine:空间索引格网大小无效

    参考如下帖子:http://www.cnblogs.com/linhugh/archive/2012/07/24/2606439.html\ C# 代码如下 IFeatureClass pNewFtC ...

  4. sign in和sign up区别

    如果是网站的话sign up是注册,sign in是登录的意思,另外,sign out退出

  5. (转)MySQL优化实例

    在Apache, PHP,MySQL的体系架构中,MySQL对于性能的影响最大,也是关键的核心部分.对于Discuz!论坛程序也是如此,MySQL的设置是否合理优化,直接影响到论坛的速度和承载量!同时 ...

  6. VS 调试

    Vs 单步调试 在vs中的单步调试: 调试重要的几个键: F9在当前光标所在的行下断点,如果当前行已经有断点,则取消断点. F5调试状态运行程序,程序执行到有断点的地方会停下来. F10单步执行程序. ...

  7. A trip through the Graphics Pipeline 2011_09_Pixel processing – “join phase”

    Welcome back!    This post deals with the second half of pixel processing, the “join phase”. The pre ...

  8. CSS成长之路----知识点篇

    一,ul--li列表水平排列,切居中对齐 主要是利用Li标签中的display属性.设置为display:inline,使li纵向排布,且能够使用text-align:center;使其居中显示 HT ...

  9. 在winform中添加普通右键菜单

    显示水平滚动条:点击GridControl的Run Designer在弹出的对话框中选择Views,将右侧属性窗口中OptionsView下的ColumnAutoWidth设置成false: 可以选择 ...

  10. Json与类对象转换

    Json在js,jquery中可以直接使用,比如下串: { "from":"en" ,"to":"zh" ," ...