`
Sev7en_jun
  • 浏览: 1225462 次
  • 性别: Icon_minigender_1
  • 来自: 广州
博客专栏
84184fc0-d0b6-3f7f-a3f0-4202acb3caf5
Apache CXF使用s...
浏览量:111305
社区版块
存档分类
最新评论

解决:Maximum number of threads (200) created for connector with address null and p

 
阅读更多

转至:http://xy123110.iteye.com/blog/1551544

 

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" />    


最大线程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.                ....../>    


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    
分享到:
评论

相关推荐

    cuda检测工具 devicequery.exe

    Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z...

    cuda检测工具 devicequery.zip(不含源代码,源代码在cuda sdk 8.0里)

    Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z...

    操作系统英文教学课件:Chapter 4 Threads.ppt

    1. **Parallelism**: Multiple threads can execute independently, allowing for more efficient use of processor cores and improved overall throughput. 2. ** Responsiveness**: Threads can be prioritized, ...

    一个基于IO::Poll和threads多线程的Echo服务程序

    ###################################################################### 下面的程序是一个基于IO::Poll和threads多线程的Echo服务程序,### 在这个程序中实现了对于Dos方式攻击的防御以及对连接超时的处理#######...

    Working with Ruby Threads

    《Working with Ruby Threads》这本书深入探讨了Ruby语言中的线程机制,对于希望利用Ruby进行高效并发编程的开发者来说是一本不可多得的资源。 #### Ruby为什么值得关注? Ruby作为一种动态类型、解释型语言,在...

    Java.Threads.and.the.Concurrency.Utilities.1484216997

    This concise book empowers all Java developers to master the complexity of the Java thread APIs and concurrency utilities. This knowledge aids the Java developer in writing correct and complex ...

    操作系统概念英文课件:Chapter 04-threads[13].pptx

    操作系统中的线程(Threads)是计算机系统中执行的基本单元,它们是CPU利用率的基础,尤其在多线程计算系统中扮演着重要角色。本章主要涵盖了线程的概念、多线程模型、线程库、线程问题以及操作系统实例分析。 线程...

    UNIX Systems Programming: Communication, Concurrency and Threads (2nd Edition)

    This fully updated UNIX classic covers everything students need to know to master UNIX threads, TCP/IP, and RPC programming—with reusable code examples that explain syntax every step of the way....

    Programming with POSIX Threads 英文版+ 中文版+源码

    通过阅读《Programming with POSIX Threads》,开发者不仅可以学习到多线程编程的基础知识,还能获得解决实际并发问题的经验,这对于开发高效、可靠的多线程应用至关重要。无论你是初学者还是经验丰富的开发者,这...

    Linux安装oracle11gR2详细步骤及常见问题解答

    Linux安装oracle 11g R2详细步骤,每一步怎么操作,包括操作命令,完全罗列出来,傻瓜式安装,就算你不懂linux不动oracle,一样可以安装成功!还包含远程连接服务器上oracle的方法,内容详细

    jboss-threads-3.1.0.Final-API文档-中文版.zip

    赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....

    EurekaLog_7.5.0.0_Enterprise

    24)..Fixed: SSL port number for Bugzilla 25)..Fixed: Disabling "Activate Exception Filters" option was ignored 26)..Fixed: Missing FTP proxy settings 27)..Fixed: IntraWeb support is updated up to 14.0...

    Professional Parallel Programming with C#: Master Parallel Extensions with .NET 4

    Now, you can write code that scales as the number of available cores increases, without having to work with complex managed threads. You are able to write code that runs tasks, and the Common ...

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm,英文版本,chm 格式,大小 1 Mb,作者:Joshua Bloch、Neal Gafter。 内容预览: Chapter 1. Introduction Chapter 2. Expressive Puzzlers Puzzle 1: ...

    Programming with POSIX Threads

    Programming with POSIX Threads

    微软内部资料-SQL性能优化2

    The boot.ini option /3GB was created for those cases where systems actually support greater than 2 GB of physical memory and an application can make use of it This capability allows memory intensive ...

    SmartThreadPool

    The number of threads dynamically changes according to the workload on the threads in the pool. Work items can return a value. A work item can be cancelled if it hasn't been executed yet. The ...

    多线程编程 UNIX LINUX Programming with POSIX Threads 第3部分

    由本人制作 . 我在很多论坛上看到类似的主题:求书:Programming with POSIX Threads?而很多人的经历是 找了很久没找到.我也是如此. 显然,这是一本相当重要的书,当你在学习UNIX/LINUX下的多线程编程的时候....

Global site tag (gtag.js) - Google Analytics