this shows the maximum number of user processes/threads allowed
ulimit -a
this shows all resource limits
cat /sys/fs/cgroup/pids.max
This checks the maximum number of processes (PIDs) allowed for the container or system cgroup.
now use logout to return to the host;
systemctl show docker | grep TasksMax
this checks whether systemd has imposed a task/thread limit on the Docker service.
systemctl show containerd | grep TasksMax
this does the same kind of check, but for the containerd service instead of Docker directly.
docker inspect app | grep -i pid
this checks the process / PID limits and settings of your Discourse container. The grep -i pid: filters to anything containing “pid” (case-insensitive).
If you keep getting errors, please could you paste the output of these commands here, that would be helpful.
Doing a rebuild from the CLI appears to have fixed it. Will keep an eye on it. Something about doing a browser update from the beta to stable in the last week triggered this.
Should there be limits on the browser upgrade ? Can the browser upgrade detect potential issue and flag it or prevent the upgrade from being triggered ?
The rebuild likely reset the container’s cgroup placement, which would explain why it’s stable again.
Given the original can’t alloc thread errors and the fact that everything else (ulimits, TasksMax, Docker PIDs) is unlimited, the remaining suspect is PID cgroup pressure.
If pids.current is approaching ~2000+ against a max of ~2285, that would confirm the container was hitting the cgroup PID ceiling during the scheduler / Redis reconnect bursts.
That would also explain why the issue only appeared after the upgrade (higher thread churn), and why the rebuild temporarily cleared it.
How many processes (PIDs/threads) are currently running inside the container/cgroup ↩︎
the maximum number of processes (PIDs/threads) allowed in that cgroup (your container) ↩︎