【问题标题】:how to reboot server when open file limit reached (Too many open files in system)达到打开文件限制时如何重新启动服务器(系统中打开的文件过多)
【发布时间】:2018-10-02 19:57:09
【问题描述】:

当达到打开文件限制时,如何重新启动 ubuntu 服务器?

我可以通过 ssh 登录,但大多数我尝试的每个命令都以错误响应:

-bash-4.3$ killall node
-bash: start_pipeline: pgrp pipe: Too many open files in system
-bash: /usr/bin/killall: Too many open files in system
-bash-4.3$ shutdown -r now
-bash: start_pipeline: pgrp pipe: Too many open files in system
-bash: /sbin/shutdown: Too many open files in system
-bash-4.3$ reboot
-bash: start_pipeline: pgrp pipe: Too many open files in system
-bash: /sbin/reboot: Too many open files in system
-bash-4.3$ sudo su -
-bash: start_pipeline: pgrp pipe: Too many open files in system
-bash: /usr/bin/sudo: Too many open files in system
-bash-4.3$   

【问题讨论】:

  • 您是否考虑过修复泄漏文件句柄的应用程序或增加可以打开的文件数量? superuser.com/questions/1200539/…
  • 谢谢,我知道如何解决它。但问题是如何停止不良进程。
  • 如果您无法以 root 身份登录并使用killkill -9 终止进程或执行shutdown,那么剩下的唯一东西就是电源按钮了。
  • 试试/sbin/init 6

标签: ubuntu reboot


【解决方案1】:

通过蛮力方法解决。 我发现,我仍然可以执行 kill 命令(不是 killall。killall 抛出错误)但找不到错误的进程(ps 抛出错误)。 我准备了包含数千个具有连续进程号的终止命令的脚本 - 我终止了有问题的进程!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-03
    • 1970-01-01
    • 2016-03-19
    • 1970-01-01
    相关资源
    最近更新 更多