即使我已经将RAM从8G升级到16G,我也收到JMeter内存不足错误

问题描述 投票:0回答:3

有人可以帮我解决在运行JMeter时遇到的内存不足(OOM)错误吗?

我是Java和JMeter以及性能测试方面的新手。我使用了命令提示符,但仍然遇到内存不足的问题。我试图调整堆大小,但是每次更改它都不会继续运行。

我当前的堆大小低于]

    set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m

我添加了另一个记忆。从8G开始,我的内存现在是16G。但是,当我再次使用1000个线程运行它时,显示以下错误:

Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread in thread Thread[Thread Group 1-130,5,main]. See the log file for details.
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread in thread Thread[Thread Group 1-63,5,main]. See log file for details.
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread in thread Thread[Thread Group 1-135,5,main]. See log file for details.
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread in thread Thread[Thread Group 1-19,5,main]. See log file for details.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate

有时我也遇到此错误:

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate

有人可以帮我吗。我只是一个初学者,所以如果您使用不太专业的术语来回答,我将不胜感激。

谢谢你。

有人可以帮我解决在运行JMeter时遇到的内存不足(OOM)错误吗?我是Java和JMeter以及性能测试方面的新手。我使用了命令提示符,但是...

java jmeter performance-testing
3个回答
0
投票

标志Xmx表示JVM的最大内存。您应该将xmx值增加到更适合您的用法。


0
投票

如果在Windows中使用Linux / ubuntu和Jmeter.bat,请在jmeter.sh文件中更改堆大小。增加-Xmx1g = 至系统内存的一半


0
投票

您收到的错误表明基础operating system无法创建新的本机线程/进程。

© www.soinside.com 2019 - 2024. All rights reserved.