ksc010
V2EX  ›  问与答

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

  •  
  •   ksc010 · Jun 27, 2020 · 3458 views
    This topic created in 2341 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
    julyclyde
    Jun 28, 2020
    1
    进程数达到上限了吧
    基本上只能重启了;平时要加强监控
    ksc010
    ksc010
    OP
    Jun 28, 2020
    2
    @julyclyde 貌似这个限制是在单个用户下面的
    新开一个终端登录另外一个用户 然后终止掉 对应的进程应该可以了(不过这台服务器上只有一个账号,没法测试是否可行)
    julyclyde
    julyclyde
    Jun 28, 2020❤️1
    3
    @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   ·   Privacy   ·   Solana   ·   4341 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 07:24 · PVG 15:24 · LAX 23:24 · JFK 02:24
    ♥ Do have faith in what you're doing.