有人可以帮我解决在运行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以及性能测试方面的新手。我使用了命令提示符,但是...
标志Xmx表示JVM的最大内存。您应该将xmx值增加到更适合您的用法。
如果在Windows中使用Linux / ubuntu和Jmeter.bat,请在jmeter.sh文件中更改堆大小。增加-Xmx1g =
至系统内存的一半
您收到的错误表明基础operating system无法创建新的本机线程/进程。