The Linux system has a maximum limit on the number of threads, and when the maximum number of threads to the system limit is reached, ssh to the system using the account password is unable to log in, the write Failed:broken pipe is reported, or the shell request faied on Chanel 0. Switch to the user under the root user will also error, Su Clouder, Tip: su:failed to Execute/bin/bash: Resources temporarily unavailable
$ ulimit-u
1024
You can see that the maximum number of threads is 1024
Modify the configuration of the maximum number of threads
# vi/etc/security/limits.d/20-nproc.conf
The contents are as follows:
* Soft Nproc 4096
Root Soft Nproc Unlimited
It can be seen that all users except the root user are limited to 1024, so you can fix the problem by annotating this line or changing the value to resolve the issue.
Modify the maximum number of threads for a Linux system user limit