synchronization

This commit is contained in:
2025-08-25 17:53:08 +08:00
commit c201eb5ef9
318 changed files with 23092 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
> 本文作者:丁辉
# Kubernetes容器启动报打开的文件数过多
**failed to create fsnotify watcher: too many open files**
> 系统中打开文件数目过多,导致无法创建更多的文件监视器
- 临时
```bash
sysctl -w fs.inotify.max_user_instances=2099999999
```
- 永久
```bash
echo "fs.inotify.max_user_instances = 2099999999" >> /etc/sysctl.conf
sysctl -p
```
重启容器后恢复
> 清理慎用
>
> ```bash
> lsof | awk '{print $2}' | sort | uniq -c | sort -n | awk '{if ($1 > threshold) print $2}' | xargs -I{} kill {}
> ```