Too many open files 解决办法

简介: 还在等什么,快来一起讨论关注吧,公众号【八点半技术站】,欢迎加入社群

今天分享一个在Linux中打开了太多文件(Too many open files)的解决方法 这个大家经常操作服务器,应该会碰到这个问题。


1、当遇到linux报错说  ...to directory watch: No space left on device ,说明fs.inotify.max_user_watches默认值太小,导致too many open files。


2、首先直接 df -H

直接去查看磁盘空间是否被沾满


3、然后 echo 1048576 > /proc/sys/fs/inotify/max_user_watches


4、然后直接进入 vim /etc/sysctl.conf


5、在sysctl.conf 中加入:

fs.inotify.max_user_watches=1048576


-----------------------完毕----------------------  

按照以上执行、便可以,没有多余话。如果更加详细了解,可以找找资料,有人会介绍的很详细。


相关文章
|
编解码 C++ Python
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
成功解决LINK : fatal error LNK1181: 无法打开输入文件“avdevice.lib” error: command 'D:\\Program Files (x86)\\Micr
|
5月前
|
存储 Java
Java【报错 01】Unable to open nested jar file 问题说明及解决方法(仅针对压缩工具 WinRAR)
Java【报错 01】Unable to open nested jar file 问题说明及解决方法(仅针对压缩工具 WinRAR)
167 0
|
Ubuntu
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
131 0
Cannot open include file: 'unistd.h': No such file or directory的解决办法
Cannot open include file: 'unistd.h': No such file or directory的解决办法
275 0
|
JavaScript
Error: EMFILE: too many open files, watch 报错的解决方法
Error: EMFILE: too many open files, watch 报错的解决方法
614 1
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
419 0
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
|
Linux 编译器 C语言
Linux动态库常见问题之-"cannot open shared object file No such file or directory"的解决办法
Linux编写程序时,会经常的接触动态库,而在程序运行时可能会遇到类似于:libxxx.so cannot open shared object file No such file or directory的问题,这个代表什么含义,该怎么解决呢?
607 0
|
数据库 索引
rpmdb open failed 的解决办法
今天用yum安装软件竟然报错: 错误:rpmdb: BDB0113 Thread/process 18550/140359256418112 failed: BDB1507 Thread died in Berkeley DB library 错误:db5 错误(-30973) 来自 ...
1571 0
|
Java Linux
too many open files
If you encounter the file descriptor leaks problem, it might be helpful to you.
2479 0