cancel
Showing results for 
Search instead for 
Did you mean: 

cl_http_server=>server_cache_upload

Thilo
Explorer
0 Kudos

Hello to all!

The following code runs in a TIME_OUT or sometimes in a SYSTEM_CORE_DUMPED error message when calling the method cl_http_server=>server_cache_upload().

DATA: cached_response TYPE REF TO if_http_response.
DATA: guid            TYPE guid_32.
DATA: l_string  TYPE string.
DATA display_url TYPE STRING.

*DO 1333333 TIMES.     " 20 MB
DO 1666666 TIMES.     " 25 MB
  CONCATENATE l_string 'nur ein Test...' INTO l_string.
ENDDO.

CREATE OBJECT cached_response TYPE cl_http_response 
                              EXPORTING add_c_msg = 1.

cached_response->set_cdata( l_string ).
cached_response->set_header_field( 
          name  = if_http_header_fields=>content_type
          value = 'application/vnd.ms-excel' ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).

CALL FUNCTION 'GUID_CREATE'
    IMPORTING ev_guid_32 = guid.
CONCATENATE runtime->application_url '/' guid INTO display_url.

cl_http_server=>server_cache_upload( url      = display_url
                                     response = cached_response ).

But setting the l_string to size of about 20 MB does work and consumes less than 1 second.

Can anyone explain me that behavior?

Thanks

Thilo

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

may the issue is with this profile parameter

icm/HTTP/server_cache_<xx>/size_MB

Regards

Raja

eddy_declercq
Active Contributor
Thilo
Explorer
0 Kudos

1.

The formula in

http://help.sap.com/saphelp_nw2004s/helpdata/en/e5/81113a2604c679e10000000a114084/frameset.htm

doesn't make sense. I think it should be:

memory_needed = 2 * (2N + U) * M + S * 1000000 bytes

instead of:

memory_needed = 2 * (2N + U) * M + S * 100000 bytes

2.

If the issue depends on the profile parameter icm/HTTP/server_cache_<xx>/size_MB (or maybe

icm/HTTP/server_cache_<xx>/memory_size_MB) a SYSTEM_CORE_DUMPED shouldn't bee the right answer of the system.

Still working on the problem...

Thilo

eddy_declercq
Active Contributor
0 Kudos

Hi,

Pls don't forget to reward points and close the question if you find the answers useful.

Eddy

mark_babsch
Explorer
0 Kudos

Hi Thilo,

I know this is a very old post, but we are facing the same problem as described here.

Even the sample shows the same behavior.

Could you remember what was the solution for the problem?

Perhaps this would help us, too!?

Thanks

Mark