步骤:
1、--查看当前各个进程打开的文件句柄数,其结果的第一列表示句柄数,第二列表示进程号
lsof -n|awk '{print $2}'|sort|uniq -c |sort -nr|more

2、--查看单个进程能够打开的最大文件句柄数量(socket连接也算在里面)
ulimit -n

3、对比1和2的结果,如果1接近或超过2了,需要将2的配置调大
ulimit -n <最大文件句柄数>

4、如果想知道打开的文件句柄数最多的进程是哪个应用程序,可以使用如下命令
ps -aef|grep <进程号>

5、如果句柄数调的非常大了,还是不行,可能需要看看/proc/sys/fs/file-max中的值,该值表示系统全局的可用句柄数,可修改
vim /proc/sys/fs/file-max

6、对于正在使用(分配出去)的所有的句柄数、未使用的所有的句柄数、可使用的最大的句柄数这3个值,可以通过以下只读文件查看
vim /proc/sys/fs/file-nr
提示:当分配出去的句柄数接近最大句柄数,而“未使用的句柄数”远大于零时,表明你遇到了一个“句柄”使用高峰,这意为着你不需要增加file-max的值。
原文如下:
When the allocated file handles come close to the maximum, but the number of unused file handles is significantly greater than 0,
you’ve encountered a peak in your usage of file handles and you don’t need to increase the maximum.

分析错误:socket accept failed too many open files的更多相关文章

  1. 本地Jdev Run PG报严重: Socket accept failed错误

    严重: Socket accept failed java.net.SocketException: select failed at java.net.PlainSocketImpl.socketA ...

  2. Socket accept failed

    启动tomcat显示如下错误: java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Nat ...

  3. confluence中org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed的解决方法

    https://www.cnblogs.com/heyongboke/p/9806396.html 1.confluence中报错信息如下: 严重 [http-nio-18090-Acceptor-0 ...

  4. Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??错误

    启动项目的时候发现tomcat跑不起来.后台输出错误Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? 发现是ecli ...

  5. 【tomcat】启动报错:Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.lang.Exception: Socket bind failed 和java.net.BindException: Address already in use: JVM_Bind错误解决

    背景:[新手] 将开发机子上的Tomcat连同其中的项目,一起拷贝到服务器上,启动tomcat的start.bat,然后报错如下: 问题1: Failed to initialize end poin ...

  6. 运行tomcat,报错:Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??错误

    运行tomcat时,报错: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??错误 原因分析: 这是因为之前已开启了一 ...

  7. java.lang.Exception: Socket bind failed: [730013] An attempt was made to acc

    在CMD命令行中启动运行startup.bat,启运程序总是闪退,查看日志发现如下错误: 26-Jan-2016 18:12:34.463 SEVERE [main] org.apache.coyot ...

  8. java.lang.Exception: Socket bind failed 服务器端口冲突-->修改端口

    需要修改三个端口号:%apache_tomcat6%/conf/server.xml 四月 11, 2014 11:39:25 上午 org.apache.catalina.core.AprLifec ...

  9. 分析一个socket通信: server/client

    分析一个socket通信: server/client1 server 1. 创建一个server_socket文件,并绑定端口,然后监听端口 (socket, bind, listen) 2. 查询 ...

随机推荐

  1. php给客户端返回数据注意。

    亲身测试: 返回的时候不要直接返回字符串,要用数组的方式返回数据客户端才能接收. 看代码. <?php require_once("../base.php"); functi ...

  2. October 30th Week 45th Sunday 2016

    Genius is nothing but labor and diligence. 天才不过是勤奋而已. Labor and diligence are the requirements for s ...

  3. windows下常查看端口占用方法总结

    启动Tomcat时又出现端口占用错误.现在把对端口的处理命令和方法进行汇总. 1.查看所有连接的PID 开始--运行--cmd  ,输入netstat -ano 找到端口号对应的PID后,从任务管理器 ...

  4. 将input file的选择的文件清空的两种解决方案

    <input type="file" id="fileupload" name="file" /> 上传文件时,选择了文件后想清 ...

  5. CSS--实现小三角形

    <style> html, body { margin: 0; padding: 0; } /*下面用CSS3分别实现向上.下.左.右的三角形*/ .btn-color{ color: # ...

  6. [项目]WebService涉及到的部分核心代码

     前言: 博客园似乎不太喜欢设计模式的东西,一连写了几篇设计模式的东西,都没什么人气,也许是写的水平有些不够,另外设计模式属于内功,怎们都得修炼一下,否则,设计混乱,不成体系,对于大型项目来说,就会显 ...

  7. git学习(五):克隆和推送远程仓库

    这里我已经注册好了GitHub账号了 生成本地的ssh和在github上添加ssh 在本地 ssh-keygen -t rsa -C "carryhjr@gmail.com" 一路 ...

  8. Sublime Text 3 快捷键

    选择类Ctrl+D 选中光标所占的文本,继续操作则会选中下一个相同的文本.Alt+F3 选中文本按下快捷键,即可一次性选择全部的相同文本进行同时编辑.举个栗子:快速选中并更改所有相同的变量名.函数名等 ...

  9. twitter.common.concurrent deadline and defer

    此defer非golang中的defer https://tour.golang.org/flowcontrol/12 from twitter.common.concurrent import Ti ...

  10. python基本图像操作与处理

    # -*- coding: utf-8 -*- from PIL import Image from pylab import * #添加中文支持 from matplotlib.font_manag ...