Forum Discussion

Frederic_Meyer's avatar
16 years ago

Soap UI Garbage Collection

Hi,

I started using SoapUI 2.5.1 on Vista 32 bits.
I had to increase the max memory options in the starting script of SoapUI, because running my Test Suites consumes a lot of memory.
What I noticed, while looking at the memory log in the UI, is that the Garbage Collection is not very efficient. What I mean here is that by right clicking on the memory log graph and  clicking Run GC, I usually get a lot of memory (up to 50%) freed. What I don't understand is why this doesn't happen automatically.
Some of my Test Suites, if left to run alone, will fail because of out of memory issues. If I run the same Test Suites and keep clicking Run GC regularly, I don't have the problem.
I have tried different Garbage Collection related options in the SoapUI starting script, but they didn't have any effect.
I am trying to automate the execution of my Test Suites, and I would like to know if there is a way to automate the Run GC as well, or to get SoapUI to clean the memory more regularly.

Thanks in advance for your answer.

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello!

    Garbage collection is generally left to the VM to handle automatically. It can be called manually, either via the memory log or programatically via a groovy script.
    To run garbage collection in a groovy script, use the following:


    System.runFinalization();
    Runtime.getRuntime().gc();


    This could be added as a TearDown script, or as a test step of its own.

    Regards,
    Dain
    eviware support