在jmeter nogui 模式下壓測,線程數設置為5000時,報錯如下:
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread. See log file for details.
問題排查:
ulimit -u
image.png
如上圖,發現可打開的進程數或線程數的最大值為709,所以加大該值即可解決問題:
運行如下命令進行修改:
sudo vim /etc/security/limits.d/20-nproc.conf
再重啟一下終端就可以了
image.png