too many open files
压测遇到这个问题,每次都查,记录一下:
系统分配文件数太少,临时修改方案:
ulimit -n 2048
永久配置:
vim /etc/security/limits.conf
底部配置:
# End of file
* soft nofile 100000
* hard nofile 100000
* soft memlock unlimited
* hard memlock unlimited
* hard nproc 100000
* soft nproc 100000
第一项配置用户,*代表所有用户,soft和hard两种都要配置,如果数量相同,第二项配“-”
by the way
如果想查看某个进程打开的文件可以用命令
#18754是进程号
lsof -p 18754
计数:
lsof -p 18754 | wc -l
too many open files的更多相关文章
- Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ...
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ... 这个错误是因为有两个相 ...
- The type javax.ws.rs.core.MediaType cannot be resolved. It is indirectly referenced from required .class files
看到了http://stackoverflow.com/questions/5547162/eclipse-error-indirectly-referenced-from-required-clas ...
- 未能写入输出文件“c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\106f9ae8\cc0e1
在本地开发环境没问题,但是发布到服务器出现:未能写入输出文件"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.Ne ...
- Find and delete duplicate files
作用:查找指定目录(一个或多个)及子目录下的所有重复文件,分组列出,并可手动选择或自动随机删除多余重复文件,每组重复文件仅保留一份.(支持文件名有空格,例如:"file name" ...
- Android Duplicate files copied in APK
今天调试 Android 应用遇到这么个问题: Duplicate files copied in APK META-INF/DEPENDENCIES File 1: httpmime-4.3.2.j ...
- Oracle客户端工具出现“Cannot access NLS data files or invalid environment specified”错误的解决办法
Oracle客户端工具出现"Cannot access NLS data files or invalid environment specified"错误的解决办法 方法一:参考 ...
- files list file for package 'xxx' is missing final newline
#!/usr/bin/python # 8th November, 2009 # update manager failed, giving me the error: # 'files list f ...
- Mac osx 安装PIL出现Some externally hosted files were ignored (use --allow-external PIL to allow).
出现这个问题Some externally hosted files were ignored (use --allow-external PIL to allow)的主要原因是PIL的一些依赖库还没 ...
- 【Linux】Too many open files
ZA 的BOSS 最近出现Too many open files 异常,这个异常一般是由于打开文件数过多引起, 最常见原因是某些连接一致未关闭 记录一些排查用到的指令 查看每个用户最大允许打开文件数量 ...
- [转]html5表单上传控件Files API
表单上传控件:<input type="file" />(IE9及以下不支持下面这些功能,其它浏览器最新版本均已支持.) 1.允许上传文件数量 允许选择多个文件:< ...
随机推荐
- python 批量替换文件名
你要是这样学习看到这种恶心不, 需求来了,批量替换文件名 movie_name = os.listdir('H:\妙味课堂') # 获取所有的文件名列表 # Node+TS+Koa+vue[编程开发] ...
- Python学习——内置函数
内置函数: 1.abs():获取绝对值 >>> abs(-10) 10 >>> a= -10 >>> a.__abs__() 10 2.all() ...
- Django关于设置自定义404和安装debug-toolbar的笔记
Django关于设置自定义404和安装debug-toolbar的笔记 关于设置404 先做好404页面,然后在views.py文件中做好映射,最后是在urls.py做好路由,而这个urls.py必须 ...
- 域名DNS解析工具ping/nslookup/dig/host
常见 DNS 记录的类型 类型 目的 A 地址记录,用来指定域名的 IPv4 地址,如果需要将域名指向一个 IP 地址,就需要添加 A 记录. AAAA 用来指定主机名(或域名)对应的 IPv6 地址 ...
- 普通socket与netty服务端交互
Socket socket = new Socket(host, port);OutputStream out = socket.getOutputStream();ByteBuffer header ...
- 如何在生产环境使用Btrace进行调试
占小狼 转载请注明原创出处,谢谢! 背景 记得前几天有人问我:在生产环境中可能经常遇到各种问题,你们一般是如何进行调试的? 很惭愧,没有经验.因为平时碰不到生产环境的服务器,定位问题需要各种数据,所以 ...
- Python报错:ImportError: No module named src.data_layer
ImportError: No module named src.data_layer 解决方案: export PYTHONPATH=path/to/modules
- Spring静态注入的三种方式
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/chen1403876161/article/details/53644024Spring静态注入的三 ...
- SpringBoot自定义线程池处理异步任务
@Async异步调用 就不解释什么是异步调用了,Spring Boot中进行异步调用很简单 1.通过使用@Async注解就能简单的将原来的同步函数变为异步函数 package com.winner.s ...
- 从UEditor内容中获取指定节点值(转)
今天吐槽一下百度的富文本编辑器UEditor,这种富文本编辑器极大地方便我们上传文件,开发人员无需编写任何上传代码,只需配置几个路径即可.但高度集成的东西有时也显得笨重,灵活度不高.比如:编辑器中我既 ...