V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
ksc010
V2EX  ›  问与答

服务器提示-bash: fork: retry: No child processes 如何处理?

  •  
  •   ksc010 · 2020-06-27 22:53:31 +08:00 · 2713 次点击
    这是一个创建于 1456 天前的主题,其中的信息可能已经有所发展或是发生改变。
    现在只有一个远程的 shell,但是执行不了任何命令(输入命令提示-bash: fork: retry: No child processes )

    除了物理重启 还有什么方法吗?
    3 条回复    2020-06-28 17:21:18 +08:00
    julyclyde
        1
    julyclyde  
       2020-06-28 15:28:26 +08:00
    进程数达到上限了吧
    基本上只能重启了;平时要加强监控
    ksc010
        2
    ksc010  
    OP
       2020-06-28 16:18:05 +08:00
    @julyclyde 貌似这个限制是在单个用户下面的
    新开一个终端登录另外一个用户 然后终止掉 对应的进程应该可以了(不过这台服务器上只有一个账号,没法测试是否可行)
    julyclyde
        3
    julyclyde  
       2020-06-28 17:21:18 +08:00   ❤️ 1
    @ksc010 是的,单用户下面的
    RLIMIT_NPROC
    The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process. Upon encountering this limit, fork(2) fails with the error EAGAIN.

    这个故事告诉我们:不要用普通的人类账户运行后台服务
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2055 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 01:30 · PVG 09:30 · LAX 18:30 · JFK 21:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.