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


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

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


相关文章
|
5月前
|
Web App开发 安全 前端开发
Can‘t open this file in this folder because it contains system files
Can‘t open this file in this folder because it contains system files
|
JavaScript
Error: EMFILE: too many open files, watch 报错的解决方法
Error: EMFILE: too many open files, watch 报错的解决方法
662 1
|
Windows
Cannot open include file: ‘Windows.h‘: No such file or directory
Cannot open include file: ‘Windows.h‘: No such file or directory
253 0
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
677 0
Keil报错:cannot open source input file "core_cmInstr.h" 解决办法
|
Ubuntu
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
解决办法:GLib-ERROR **: Creating pipes for GWakeup: Too many open files
163 0
Cannot open include file: 'unistd.h': No such file or directory的解决办法
Cannot open include file: 'unistd.h': No such file or directory的解决办法
360 0
|
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的问题,这个代表什么含义,该怎么解决呢?
1021 0
|
数据库 索引
rpmdb open failed 的解决办法
今天用yum安装软件竟然报错: 错误:rpmdb: BDB0113 Thread/process 18550/140359256418112 failed: BDB1507 Thread died in Berkeley DB library 错误:db5 错误(-30973) 来自 ...
1629 0
|
Java Linux
too many open files
If you encounter the file descriptor leaks problem, it might be helpful to you.
2521 0