You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Pa...@sybase.com on 2010/07/28 23:58:54 UTC

OutOfMemoryError: Java heap space

Hi,

When I set the number of threads up to 120, the plan runs well without 
issues. However, when I set the number of threads to 130, I will have the 
following error in the jmeter.log:


ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space


I have changed HEAP settings in jmeter.bat from 

-Xms512m -Xmx512m

to 

-Xms2048m -Xmx2048m


but still cannot get rid of the error.





Any suggestions? Thank you.

Patty

Re: OutOfMemoryError: Java heap space

Posted by Adrian Speteanu <as...@gmail.com>.
you have to increase the virtual memory size, if on a windows station and a
defragmenting of the OS disk-partition might be useful for the space to
provide room for the JVM requirements. I've encountered a similar JVM crash
during load tests and after some research found some opinions / comments on
the bug that the JVM requires the virtual memory not to be fragmented (so
that it has continuous space for blocks of at least 50% of JVM virtual
memory space requirements) - however, it was also a windows only issue. this
sounded tricky since it's the OS responsibility to manage resources and not
of the JVM, but it doesn't occur if you set the starting parameters in
jmeter.bat correctly for your test machine and if the virtual memory isn't
used intensively by other applications in parallel with jmeter...

On Fri, Jul 30, 2010 at 8:57 PM, Deepak Shetty <sh...@gmail.com> wrote:

> hi
>
> it means your machine could not allocate the amount of memory you have
> specified in a contiguous block. It depends on how much RAM you have , how
> much is used , how much virtual memory etc etc. Close as many applications
> a
> syou can and retry or reduce the Xms Xmx value (1GB or 1.5 Gb)
>
> regards
> deepak
>
> On Fri, Jul 30, 2010 at 7:10 AM, Suresh Rajachar
> <su...@yahoo.com>wrote:
>
> >
> >
> > I am facing teh same problem.
> > After i increase the heap size in jmeter bat file and started the bat
> file,
> > i am
> > geting this error message
> >
> > Error occurred during initialization of VM
> > Could not reserve enough space for object heap
> > Could not create the Java virtual machine.
> > errorlevel=1
> > Press any key to continue . . .
> >
> > Can anyone suggest me the work around please ?
> >
> >
> > Regards,
> > Suresh R
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > Deepak,
> > >
> > > I have been playing with it. Now, what I do is to execute jmeter.bat to
> > > open up jmeter, then pull up my test plan and do not get anymore
> errors.
> > If
> > > I execute jmeter icon linked to the ApacheJMeter.jar, that is the time
> I
> > got
> > > the OutOfMemory error.
> > >
> > > I just do not understand the reason for executing ApacheJMeter.jar to
> get
> > > outofMemory error. Is there a way for me to set up ApacheJMeter.jar to
> > use
> > > jmeter.bat?
> > >
> > > Thanks.
> > >
> > > Patty
> > >
> > >
> > >
> > >
> > >    *Re: OutOfMemoryError: Java heap space*
> > >  *Deepak Shetty * to: JMeter Users List
> > > 07/28/2010 03:10 PM
> > >
> > >  *Please respond to "JMeter Users List"*
> > >
> > >
> > >
> > > ------------------------------
> > >
> > >
> > >
> > >
> >
> http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
> > > Are you running in GUI mode, if so dont? Did you verify your changes
> got
> > > picked correctly (java process should show 2GB being used)
> > >
> > > regards
> > > deepak
> > >
> > > On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > When I set the number of threads up to 120, the plan runs well
> without
> > > > issues. However, when I set the number of threads to 130, I will have
> > the
> > > > following error in the jmeter.log:
> > > >
> > > >
> > > > ERROR - jmeter.threads.JMeterThread: Test failed!
> > > > java.lang.OutOfMemoryError: Java heap space
> > > >
> > > >
> > > > I have changed HEAP settings in jmeter.bat from
> > > >
> > > > -Xms512m -Xmx512m
> > > >
> > > > to
> > > >
> > > > -Xms2048m -Xmx2048m
> > > >
> > > >
> > > > but still cannot get rid of the error.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Any suggestions? Thank you.
> > > >
> > > > Patty
> > >
> > >
> >
> >
> >
> >
>

Re: OutOfMemoryError: Java heap space

Posted by Deepak Shetty <sh...@gmail.com>.
hi

it means your machine could not allocate the amount of memory you have
specified in a contiguous block. It depends on how much RAM you have , how
much is used , how much virtual memory etc etc. Close as many applications a
syou can and retry or reduce the Xms Xmx value (1GB or 1.5 Gb)

regards
deepak

On Fri, Jul 30, 2010 at 7:10 AM, Suresh Rajachar
<su...@yahoo.com>wrote:

>
>
> I am facing teh same problem.
> After i increase the heap size in jmeter bat file and started the bat file,
> i am
> geting this error message
>
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> errorlevel=1
> Press any key to continue . . .
>
> Can anyone suggest me the work around please ?
>
>
> Regards,
> Suresh R
>
>
>
>
>
>
>
>
>
> > Deepak,
> >
> > I have been playing with it. Now, what I do is to execute jmeter.bat to
> > open up jmeter, then pull up my test plan and do not get anymore errors.
> If
> > I execute jmeter icon linked to the ApacheJMeter.jar, that is the time I
> got
> > the OutOfMemory error.
> >
> > I just do not understand the reason for executing ApacheJMeter.jar to get
> > outofMemory error. Is there a way for me to set up ApacheJMeter.jar to
> use
> > jmeter.bat?
> >
> > Thanks.
> >
> > Patty
> >
> >
> >
> >
> >    *Re: OutOfMemoryError: Java heap space*
> >  *Deepak Shetty * to: JMeter Users List
> > 07/28/2010 03:10 PM
> >
> >  *Please respond to "JMeter Users List"*
> >
> >
> >
> > ------------------------------
> >
> >
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
> > Are you running in GUI mode, if so dont? Did you verify your changes got
> > picked correctly (java process should show 2GB being used)
> >
> > regards
> > deepak
> >
> > On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:
> >
> > > Hi,
> > >
> > > When I set the number of threads up to 120, the plan runs well without
> > > issues. However, when I set the number of threads to 130, I will have
> the
> > > following error in the jmeter.log:
> > >
> > >
> > > ERROR - jmeter.threads.JMeterThread: Test failed!
> > > java.lang.OutOfMemoryError: Java heap space
> > >
> > >
> > > I have changed HEAP settings in jmeter.bat from
> > >
> > > -Xms512m -Xmx512m
> > >
> > > to
> > >
> > > -Xms2048m -Xmx2048m
> > >
> > >
> > > but still cannot get rid of the error.
> > >
> > >
> > >
> > >
> > >
> > > Any suggestions? Thank you.
> > >
> > > Patty
> >
> >
>
>
>
>

Re: OutOfMemoryError: Java heap space

Posted by Felix Frank <ff...@mpexnet.de>.
Make sure your memory + swap can accomodate that amount of memory, also
keeping in mind the amount of memory already used by other applications
and your OS.

Cheers,
Felix

On 07/30/10 16:31, Suresh Rajachar wrote:
> Its 32 bit system and i increased teh heap size to 2048 
> 
>  
> Regards, 
> Suresh R 

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: OutOfMemoryError: Java heap space

Posted by Suresh Rajachar <su...@yahoo.com>.
Its 32 bit system and i increased teh heap size to 2048 

 
Regards, 
Suresh R 



 




________________________________
From: Felix Frank <ff...@mpexnet.de>
To: JMeter Users List <jm...@jakarta.apache.org>
Sent: Fri, July 30, 2010 3:25:27 PM
Subject: Re: OutOfMemoryError: Java heap space

To what did you increase it? What type of system is this (32bit, 64bit)?

On 07/30/10 16:10, Suresh Rajachar wrote:
> 
> 
> I am facing teh same problem. 
> After i increase the heap size in jmeter bat file and started the bat file, i 
>am 
>
> geting this error message
> 
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> errorlevel=1
> Press any key to continue . . .

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


      

Re: OutOfMemoryError: Java heap space

Posted by Felix Frank <ff...@mpexnet.de>.
To what did you increase it? What type of system is this (32bit, 64bit)?

On 07/30/10 16:10, Suresh Rajachar wrote:
> 
> 
> I am facing teh same problem. 
> After i increase the heap size in jmeter bat file and started the bat file, i am 
> geting this error message
> 
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Could not create the Java virtual machine.
> errorlevel=1
> Press any key to continue . . .

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: OutOfMemoryError: Java heap space

Posted by Suresh Rajachar <su...@yahoo.com>.

I am facing teh same problem. 
After i increase the heap size in jmeter bat file and started the bat file, i am 
geting this error message

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
errorlevel=1
Press any key to continue . . .

Can anyone suggest me the work around please ?


Regards, 
Suresh R 



 





> Deepak,
>
> I have been playing with it. Now, what I do is to execute jmeter.bat to
> open up jmeter, then pull up my test plan and do not get anymore errors. If
> I execute jmeter icon linked to the ApacheJMeter.jar, that is the time I got
> the OutOfMemory error.
>
> I just do not understand the reason for executing ApacheJMeter.jar to get
> outofMemory error. Is there a way for me to set up ApacheJMeter.jar to use
> jmeter.bat?
>
> Thanks.
>
> Patty
>
>
>
>
>    *Re: OutOfMemoryError: Java heap space*
>  *Deepak Shetty * to: JMeter Users List
> 07/28/2010 03:10 PM
>
>  *Please respond to "JMeter Users List"*
>
>
>
> ------------------------------
>
>
>
> http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
> Are you running in GUI mode, if so dont? Did you verify your changes got
> picked correctly (java process should show 2GB being used)
>
> regards
> deepak
>
> On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:
>
> > Hi,
> >
> > When I set the number of threads up to 120, the plan runs well without
> > issues. However, when I set the number of threads to 130, I will have the
> > following error in the jmeter.log:
> >
> >
> > ERROR - jmeter.threads.JMeterThread: Test failed!
> > java.lang.OutOfMemoryError: Java heap space
> >
> >
> > I have changed HEAP settings in jmeter.bat from
> >
> > -Xms512m -Xmx512m
> >
> > to
> >
> > -Xms2048m -Xmx2048m
> >
> >
> > but still cannot get rid of the error.
> >
> >
> >
> >
> >
> > Any suggestions? Thank you.
> >
> > Patty
>
>


      

Re: OutOfMemoryError: Java heap space

Posted by Pa...@sybase.com.
Thank you.

patty





Re: OutOfMemoryError: Java heap space

Deepak Shetty 
to:
JMeter Users List
07/29/2010 02:24 PM

Please respond to "JMeter Users List"






Your environment is configured to run java for files of extension.jar. 
There
is no way as far as i know to do what you want (You could configure your 
OS
to run jmeter.bat for .jar but thats probably not what you want)

On Thu, Jul 29, 2010 at 1:59 PM, <Pa...@sybase.com> wrote:

>
> Deepak,
>
> I have been playing with it. Now, what I do is to execute jmeter.bat to
> open up jmeter, then pull up my test plan and do not get anymore errors. 
If
> I execute jmeter icon linked to the ApacheJMeter.jar, that is the time I 
got
> the OutOfMemory error.
>
> I just do not understand the reason for executing ApacheJMeter.jar to 
get
> outofMemory error. Is there a way for me to set up ApacheJMeter.jar to 
use
> jmeter.bat?
>
> Thanks.
>
> Patty
>
>
>
>
>    *Re: OutOfMemoryError: Java heap space*
>  *Deepak Shetty * to: JMeter Users List
> 07/28/2010 03:10 PM
>
>  *Please respond to "JMeter Users List"*
>
>
>
> ------------------------------
>
>
>
> 
http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
> Are you running in GUI mode, if so dont? Did you verify your changes got
> picked correctly (java process should show 2GB being used)
>
> regards
> deepak
>
> On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:
>
> > Hi,
> >
> > When I set the number of threads up to 120, the plan runs well without
> > issues. However, when I set the number of threads to 130, I will have 
the
> > following error in the jmeter.log:
> >
> >
> > ERROR - jmeter.threads.JMeterThread: Test failed!
> > java.lang.OutOfMemoryError: Java heap space
> >
> >
> > I have changed HEAP settings in jmeter.bat from
> >
> > -Xms512m -Xmx512m
> >
> > to
> >
> > -Xms2048m -Xmx2048m
> >
> >
> > but still cannot get rid of the error.
> >
> >
> >
> >
> >
> > Any suggestions? Thank you.
> >
> > Patty
>
>


Re: OutOfMemoryError: Java heap space

Posted by Deepak Shetty <sh...@gmail.com>.
Your environment is configured to run java for files of extension.jar. There
is no way as far as i know to do what you want (You could configure your OS
to run jmeter.bat for .jar but thats probably not what you want)

On Thu, Jul 29, 2010 at 1:59 PM, <Pa...@sybase.com> wrote:

>
> Deepak,
>
> I have been playing with it. Now, what I do is to execute jmeter.bat to
> open up jmeter, then pull up my test plan and do not get anymore errors. If
> I execute jmeter icon linked to the ApacheJMeter.jar, that is the time I got
> the OutOfMemory error.
>
> I just do not understand the reason for executing ApacheJMeter.jar to get
> outofMemory error. Is there a way for me to set up ApacheJMeter.jar to use
> jmeter.bat?
>
> Thanks.
>
> Patty
>
>
>
>
>    *Re: OutOfMemoryError: Java heap space*
>  *Deepak Shetty * to: JMeter Users List
> 07/28/2010 03:10 PM
>
>  *Please respond to "JMeter Users List"*
>
>
>
> ------------------------------
>
>
>
> http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
> Are you running in GUI mode, if so dont? Did you verify your changes got
> picked correctly (java process should show 2GB being used)
>
> regards
> deepak
>
> On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:
>
> > Hi,
> >
> > When I set the number of threads up to 120, the plan runs well without
> > issues. However, when I set the number of threads to 130, I will have the
> > following error in the jmeter.log:
> >
> >
> > ERROR - jmeter.threads.JMeterThread: Test failed!
> > java.lang.OutOfMemoryError: Java heap space
> >
> >
> > I have changed HEAP settings in jmeter.bat from
> >
> > -Xms512m -Xmx512m
> >
> > to
> >
> > -Xms2048m -Xmx2048m
> >
> >
> > but still cannot get rid of the error.
> >
> >
> >
> >
> >
> > Any suggestions? Thank you.
> >
> > Patty
>
>

Re: OutOfMemoryError: Java heap space

Posted by Pa...@sybase.com.
Deepak,

I have been playing with it. Now, what I do is to execute jmeter.bat to 
open up jmeter, then pull up my test plan and do not get anymore errors. 
If I execute jmeter icon linked to the ApacheJMeter.jar, that is the time 
I got the OutOfMemory error.

I just do not understand the reason for executing ApacheJMeter.jar to get 
outofMemory error. Is there a way for me to set up ApacheJMeter.jar to use 
jmeter.bat?

Thanks.

Patty







Re: OutOfMemoryError: Java heap space

Deepak Shetty 
to:
JMeter Users List
07/28/2010 03:10 PM

Please respond to "JMeter Users List"






http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
Are you running in GUI mode, if so dont? Did you verify your changes got
picked correctly (java process should show 2GB being used)

regards
deepak

On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:

> Hi,
>
> When I set the number of threads up to 120, the plan runs well without
> issues. However, when I set the number of threads to 130, I will have 
the
> following error in the jmeter.log:
>
>
> ERROR - jmeter.threads.JMeterThread: Test failed!
> java.lang.OutOfMemoryError: Java heap space
>
>
> I have changed HEAP settings in jmeter.bat from
>
> -Xms512m -Xmx512m
>
> to
>
> -Xms2048m -Xmx2048m
>
>
> but still cannot get rid of the error.
>
>
>
>
>
> Any suggestions? Thank you.
>
> Patty


Re: OutOfMemoryError: Java heap space

Posted by Deepak Shetty <sh...@gmail.com>.
http://jakarta.apache.org/jmeter/usermanual/best-practices.html#lean_mean
Are you running in GUI mode, if so dont? Did you verify your changes got
picked correctly (java process should show 2GB being used)

regards
deepak

On Wed, Jul 28, 2010 at 2:58 PM, <Pa...@sybase.com> wrote:

> Hi,
>
> When I set the number of threads up to 120, the plan runs well without
> issues. However, when I set the number of threads to 130, I will have the
> following error in the jmeter.log:
>
>
> ERROR - jmeter.threads.JMeterThread: Test failed!
> java.lang.OutOfMemoryError: Java heap space
>
>
> I have changed HEAP settings in jmeter.bat from
>
> -Xms512m -Xmx512m
>
> to
>
> -Xms2048m -Xmx2048m
>
>
> but still cannot get rid of the error.
>
>
>
>
>
> Any suggestions? Thank you.
>
> Patty