未捕获的异常 java.lang.OutOfMemoryError:“无法创建新的本机线程"在非 gui 模式下运行 jmeter 时发生错误 [英] Uncaught Exception java.lang.OutOfMemoryError: "unable to create new native thread" error occurring while running jmeter in non gui mode

查看:24
本文介绍了未捕获的异常 java.lang.OutOfMemoryError:“无法创建新的本机线程"在非 gui 模式下运行 jmeter 时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的场景,

Step1:我已经为 1000:threads & 设置了我的线程组500:秒
Step2:配置堆空间:HEAP=-Xms1024m -Xmx1024m
Step3:现在,在非 gui 模式下运行 jmeter.在这种情况下,未捕获的异常java.lang.OutOfMemoryError:无法创建新的本机线程"错误出现在我的系统中.

Step1: I have set my thread group for 1000:threads & 500:seconds
Step2:Configure heep space : HEAP=-Xms1024m -Xmx1024m
Step3:Now, running jmeter for non gui mode. In this scenario,"Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread" error occuring in my system.

我的系统配置

处理器:Intel® Pentium(R) CPU G2010 @ 2.80GHz × 2
操作系统类型:32位
光盘:252.6GB
内存:3.4 GiB

Processor:Intel® Pentium(R) CPU G2010 @ 2.80GHz × 2
OS Type:32 bit
Disc:252.6GB
Memory:3.4 GiB

请给我一个解决方案.

谢谢,瓦拉穆图.

推荐答案

您的问题是由于使用了 32 位操作系统,在这种模式下,您可以分配为堆的内容受到限制(取决于操作系统,您不会能够超过 1.6 到 2.1 g) 和本地线程创建.

Your issue is due to using a 32 bit OS, in this mode you are limited both in what you can allocate as Heap (depending on OS you will not be able to exceed 1.6 to 2.1 g) and native threads creation.

我建议切换到 64 位操作系统 + 64 位 Jdk.

I'd suggest switching to 64 Bits OS + 64 bits Jdk.

但是如果您没有任何其他选项,请尝试在 JVM_ARGS 中的 jmeter.sh 中进行设置:

But if you don't have any other option try setting in jmeter.sh in JVM_ARGS:

-Xss128k

或者如果太低:

-Xss256k

这篇关于未捕获的异常 java.lang.OutOfMemoryError:“无法创建新的本机线程"在非 gui 模式下运行 jmeter 时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆