Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Generated proxy: no memory for processing HTTP.

Former Member
0 Likes
3,107

We use a generated Enterprise Service client proxy to query an external web-service (SOAP via HTTP using WSDL description file).

Single queries work perfectly. We clear the proxy class instance after each execution, but after around 1000 executions in the same work-process, we receive the error-message "no memory for processing HTTP, HTTPS or SMTP quer". No dump is created in ST22.

It looks like the HTTP connection handled by CL_HTTP_CLIENT is not closed (I can see this at the webservice-host). Execution of CL_HTTP_CLIENT->close( ) could solve this, but during runtime of the generated proxy method it looks like we do not have access to an appropriate interface/reference to do that.

Example programm:

  • create simple test program to execute 1000 times:

*&---------------------------------------------------------------------*

REPORT  zroland_tmp5.

DATA: lt_req TYPE TABLE OF zrodo_something_request,

           lt_res TYPE TABLE OF zrodo_something_response.

DATA: ls_req TYPE zrodo_something_request,

           ls_res TYPE zrodo_something_response,

           ls_params TYPE zrodo_something_request_type.

DATA: lr_ws TYPE REF TO zroco_servicename_port_type.

DATA: lv_loop TYPE i VALUE 1000,

           lv_check TYPE c.

ls_params-age = '30'.

*** Create load-test input table

WHILE lv_loop > 0.

  IF lv_check EQ abap_true.

    ls_params-name = 'trusteduser'.

    lv_check = abap_false.

  ELSE.

    ls_params-name = 'OtherUser'.

    lv_check = abap_false.

  ENDIF.

  ls_req-parameters = ls_params.

  APPEND ls_req TO lt_req.

  lv_loop = lv_loop - 1.

ENDWHILE.

*** run the load test

LOOP AT lt_req INTO ls_req.

  CREATE OBJECT lr_ws.

  TRY.

      lr_ws->do_something(

        EXPORTING

          input  = ls_req

        IMPORTING

          output = ls_res

             ).

      CLEAR: lr_ws.

    CATCH cx_ai_system_fault .

    CATCH cx_ai_application_fault .

  ENDTRY.

ENDLOOP.

You may find the src code of the test-webservice here (using nuSOAP und PHP5 just to test with...) http://em2webd.avnet.eu/soaptest/test2.phps

Any Ideas?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,643

The solution:

Do not create a proxy object for every single request. Instead, create the object once and re-use it.  Even if you clear the instance, the HTTP connection will stay alive and one server may handle around 500 connections at one time.

If you manipulate the the request before execution (e.g. add header fields using if_wsprotocol_ws_header ) you need to do this before every request (but with the same object).

4 REPLIES 4
Read only

Former Member
0 Likes
1,644

The solution:

Do not create a proxy object for every single request. Instead, create the object once and re-use it.  Even if you clear the instance, the HTTP connection will stay alive and one server may handle around 500 connections at one time.

If you manipulate the the request before execution (e.g. add header fields using if_wsprotocol_ws_header ) you need to do this before every request (but with the same object).

Read only

0 Likes
1,643

Thank you for this post, Roland !

I had the same error message, and the fact to re-use always the same proxy object solved my problem

Thanks again, Pippa


Read only

0 Likes
1,643

Hello Roland,

I am experiencing the same error, although my situation is a bit different. I create the proxy object, call some methods and then I call one method in loop with table data. When we executed the program with large amount of data, so the table size became more than 1000 (roughly), we got the same error. Have you ever had a problem like this?

Read only

0 Likes
1,643

Hi,

Have you found a solution for this issue ?