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.允许上传文件数量 允许选择多个文件:< ...
随机推荐
- BZOJ.4542.[HNOI2016]大数(莫队)
题目链接 大数除法是很麻烦的,考虑能不能将其条件化简 一段区间[l,r]|p,即num[l,r]|p,类似前缀,记后缀suf[i]表示[i,n]的这段区间代表的数字 于是有 suf[l]-suf[r+ ...
- 2852 ACM 杭电 KiKi's K-Number 0 1 2
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2852 题意:三种操作: 0 插入 1 删除 2 查找比a大的第k个数. 思路:看了大神都是用树状数组写的, ...
- 【NOIP2018】【RP++!】【神大退役记+一丢丢回忆录】
emmm初赛都完了啊,还有20多天的样子退役选手又要++++++了 所以在这里先预祝各路dalao取得好成绩!! 手动艾特亲友$@Abyssful@阿澈说他也想好好学习@Ed\_Sheeran@歪瓜是 ...
- emSecure Use Digital Signatures to protect your products
emSecure Use Digital Signatures to protect your products emSecure is an RSA based software solution ...
- C# 数据结构基础-实现循环队列
队列 队列的概念是先进先出,这个应该不用多说了.看下面那个从网上找的现成图片. 循环队列 循环队列在逻辑上将队列中的数据摆成环形,如下图: 下面直接上代码. 队列 队列的概念是先进先出 ...
- 你真的会用Gson吗?Gson使用指南(4)
原文出处: 怪盗kidou 注:此系列基于Gson 2.4. 本次文章的主要内容: TypeAdapter JsonSerializer与JsonDeserializer TypeAdapterFac ...
- SpringMVC拦截器详解
拦截器是每个Web框架必备的功能,也是个老生常谈的主题了. 本文将分析SpringMVC的拦截器功能是如何设计的,让读者了解该功能设计的原理. 重要接口及类介绍 1. HandlerExecution ...
- 马斯克:有62%的程序员认为人工智能会被武器化 #精选AR人工智能算法
当地时间 9 月 13 日,马斯克在自己的个人推特账号上转推了一篇名为<Hackers Have Already Started to Weaponize Artificial Intellig ...
- ios mac 对照片进行JPEG压缩
ios mac 对照片进行JPEG压缩 1. 在iOS上可以使用 API UIImageJPEGRepresentation 对照片数据进行JPEG压缩: 我们知道iOS其实是MAC OS 的移植,那 ...
- storm杂谈之Why use netty as transport instead of zeromq
Storm后来用Netty来代替了zmq,这个能够參考一下两篇blog 这两篇blog具体的阐述原因以及一些性能測试, 大家參考一下 Reference 1.Netty 4 Reduces GC Ov ...