Forum Discussion

Beno_Iskratel's avatar
Beno_Iskratel
Frequent Contributor
13 years ago

Mock servis: GC overhead limit exceeded

hi,

i'm running mock servis. in aprox 12 hours, mock must handle 400.000 requests. when mock recieves request A, request B (readRecord) is sent from mock to server and after server responses with response B, mock returns response A.
there are a lot of problems witm memory. at morning when i get to work SoapUI doesn't work. I can see in memory log, the graph is on the top, flat line and java (SoapUI) is using 1.2GiB of memory.
on windows, i solved the problem with disabling soapUI log and http log.
on linux, this doesn't work.

there is also problem, that i have to open all requests in CcsServiceSoap11Binding interface and minimaze them. if i don't open them, they don't work and if i don't minimize them, soapUI runs out of memmory also on windows.

please check if you can find anything. perhaps in mock start, onRequest script or mock Response1 Script?
on linux i'm using 3.6.2.


here are request for mock and response for testCase.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<Update_CRMRecord_StatusAS xmlns="http://test57.cocos.si/">
<pID>2032075</pID>
<pStatus>Finished</pStatus>
</Update_CRMRecord_StatusAS>
</S:Body>
</S:Envelope>

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:readRecordResponse xmlns="http://ccs.service112.iskratel.si/xsd" xmlns:ns2="http://ccs.service112.iskratel.si">
<ns2:return>
<id>1772851</id>
<crdate>1316609942025</crdate>
<latitude>4169</latitude>
<longitude>2714</longitude>
<operatorid>1</operatorid>
<phonenumber>8344683104</phonenumber>
<radious>5768</radious>
</ns2:return>
</ns2:readRecordResponse>
</S:Body>
</S:Envelope>



regards,
beno

9 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    thanks for this - do you get the same problems with 4.0.x? Also, have you tried disabling the request log in the MockService window?

    /Ole
    SmartBear Software
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    i hope i'll get some results with 4.0.2 today.
    i didn't disable MockService window, i just limited it to 300 rows.

    can you tell me why do i have to open all 24 requests from CcsServiceSoap11Binding? if i don't do this than SoapUI doesn't work (new content is not put into request).
    and if i don't minimize them than SoapUI runs into problems with memory. i think... it's strange, i'm also a bit confuzed.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I agree.. we'll have to look at this and will get back to you...

    regards,

    /Ole
    SmartBear Software
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    hi,

    4.0.2 doesn't make any difference.
    you can reproduse this easy.
    heap memory usage is rising and rising and rising... you know what happenes later. >:D

    i attached picture. right now soapUI still works, but it's close to the end, perhaps just 2 or 3 more hours before only killing java process can "help".
    OS is Fedora 7.

    windows platform doesn't have any problems.

    regards,
    beno
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Beno,

    ok thanks - you need to access the response via the submit object returned by the submit method;

    //define
    def submit = null

    synchronized(context.lock) {
    String kreiran_req = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ccs=\"http://ccs.service112.iskratel.si\"><soapenv:Header/><soapenv:Body><ccs:readRecord><ccs:id>"+substr+"</ccs:id></ccs:readRecord></soapenv:Body></soapenv:Envelope>"
    request.requestContent = kreiran_req
    // save submit
    submit = request.submit( new com.eviware.soapui.impl.wsdl.WsdlSubmitContext( request ), false )
    }

    log.info submit.response.contentAsString

    def TimeTaken = submit.response.timeTaken
    ....

    if you change this throughout your script then it will work without having to have the request windows open.. this might help your memory issue also, at least I am not seeing any memory fill-up during a long-running loadtest

    please try the above (make sure you change it everywhere) and let us know how it works..

    if you are still having troubles, please send us your updated project so we can continue from there..

    regards,

    /Ole
    SmartBear Software
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    tnx ole,

    fast replay because i have to go...

    this is what i get:

    Wed Nov 30 15:21:53 CET 2011:ERROR:java.lang.Exception: Cannot get property 'timeTaken' on null object
    java.lang.Exception: Cannot get property 'timeTaken' on null object
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.evaluateScript(WsdlMockResponse.java:359)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.execute(WsdlMockResponse.java:264)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(WsdlMockOperation.java:259)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchPostRequest(WsdlMockRunner.java:300)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:384)
    at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:714)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException: Cannot get property 'timeTaken' on null object
    at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56)
    at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:156)
    at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:235)
    at Script1.run(Script1.groovy:62)
    at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96)
    at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:88)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.evaluateScript(WsdlMockResponse.java:355)
    ... 17 more




    beno
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    then it seems you got the script wrong somehow - can you paste it here?

    regards!

    /Ole
    SmartBear Software
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    hi,

    you're right. the script was wrong.
    i have put def submit = null inside of {}, should be outside.
    synchronized(context.lock) {
    def submit = null
    ...
    }

    Another great information, it seems that memory problems (in linux os) are solved!
    Hep memory usage is stable now. (4.0.2 SNAPSHOT version of SoapUI)
    soapUI log and http log also don't make any problems (1000 row limit).

    tnx,
    beno