Search code examples
jmeterjmeter-3.2

Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate


We have a JMeter test which stops in between giving the following error message

enter image description here

It runs fine when I run the tests with a load of 100,200 and 300 Users

I found one question jmeter test failed with out of memory error but that didn't help to solve the issue.

Have tried running this on machines with 12 GB RAM and also with a 16 GB RAM.

What could be the possible reason for it to behave so?

also tried to run on non-GUI mode even there the test stops.

Non GUI mode


Solution

  • I had to add the following piece of code in jmeter.bat ( Batch file )

    set JVM_ARGS=-Xms512m -Xmx8000m
    

    I added this in here

        if not defined HEAP (
        rem See the unix startup file for the rationale of the following parameters,
        rem including some tuning recommendations
        set HEAP=-Xms1g -Xmx1g -XX:MaxMetaspaceSize=8000m 
    
    )
    set JVM_ARGS=-Xms512m -Xmx8000m 
    

    then it worked just fine.