V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ksc010
V2EX  ›  问与答

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

  •  
  •   ksc010 · Jun 27, 2020 · 3070 views
    This topic created in 2135 days ago, the information mentioned may be changed or developed.
    现在只有一个远程的 shell,但是执行不了任何命令(输入命令提示-bash: fork: retry: No child processes )

    除了物理重启 还有什么方法吗?
    3 replies    2020-06-28 17:21:18 +08:00
    julyclyde
        1
    julyclyde  
       Jun 28, 2020
    进程数达到上限了吧
    基本上只能重启了;平时要加强监控
    ksc010
        2
    ksc010  
    OP
       Jun 28, 2020
    @julyclyde 貌似这个限制是在单个用户下面的
    新开一个终端登录另外一个用户 然后终止掉 对应的进程应该可以了(不过这台服务器上只有一个账号,没法测试是否可行)
    julyclyde
        3
    julyclyde  
       Jun 28, 2020   ❤️ 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.

    这个故事告诉我们:不要用普通的人类账户运行后台服务
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2447 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 07:48 · PVG 15:48 · LAX 00:48 · JFK 03:48
    ♥ Do have faith in what you're doing.