Forum Discussion

RealNetworks's avatar
RealNetworks
Occasional Contributor
11 years ago

Running out of memory

Hi,

I have a very simple upload file test, but the problem is that when I run it through LoadUI for about 100 req/sec JVM heap and perm size increase very quickly and LoadUI soon runs out of memory. I have increased max heap size and the maxpermsize to few GB but the problem is still there and this seems like a way too much memory consumption for such a simple test and a script.

I was thinking of opening this topic inside the LoadUI section put I suspect that the problem is with the upload script which maybe causes some memory leaks:

testFile = new File(testRunner.testCase.testSuite.project.getPath())
resourceDir = new File(testFile.getParentFile(), "testdata")
myFile = new File(resourceDir,"avi_test_file.avi")
// get request
def request = testRunner.testCase.getTestStepByName("UPLOAD - Chunk Upload").testRequest
// clear existing attachments
for( a in request.attachments ) {
request.removeAttachment( a )
}
testRunner.testCase.testSteps["UPLOAD - Chunk Upload"].getHttpRequest().attachFile(myFile, true)


Am I doing something wrong here? Should I explicitly dispose file objects at the end of the script, would that help? File attachment is not big, approx. 1MB.

Thank you all for your answers.

Kind regards

7 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    1. What is the file size being uploaded?
    2. No of threads?
    3. Strategy and limits?
    4. Test delay ?
    5. Operating System ?
  • RealNetworks's avatar
    RealNetworks
    Occasional Contributor
    1. 1.4MB
    2. Max internal threads: 1000, Max internal thread queue size: 10 000, SoapUI Runner -> Max concur. req: 1000, Max queue size: 1000
    3. Fixed rate 200 / Sec, Time limit: 300 seconds
    4. No delay
    5. Windows Server 2008 R2
  • nmrao's avatar
    nmrao
    Champion Level 3
    Thank you for the details.

    Not sure if you need to test that only. May I request to try with less number of threads say less than 5 with Test delay 200 ms. If that works, start gradually increasing it.
    May be max heap can be increased to 2 or 3 GB server 64 bit and has the capacity to increase for soapui. Permsize 256/512 MB should be ok, I believe.
  • I have a similar issue where I used a fixed rate of 20TPS and tried close to 100K requests. The Load test runs fine till 70K and then the CPU usage spikes over 50 and heap and perm size increases and eventually freezes LoadUI. Any help would be much appreciated.
  • ashidhull wrote:
    I have a similar issue where I used a fixed rate of 20TPS and tried close to 100K requests. The Load test runs fine till 70K and then the CPU usage spikes over 50 and heap and perm size increases and eventually freezes LoadUI. Any help would be much appreciated.

    Are you running a distributed test (using agents)?
  • IAmThatStrange wrote:
    Ditto here

    Please explain (or send us) your test so we can reproduce it.