This website is not affiliated with, sponsored by, or approved by SAP AG.

Program terminated: Time limit exceeded, ABAP performance

Basis (Basis Technology Modules: Basis Component/System Administration, GUIs)

Moderators: Snowy, thx4allthefish

Program terminated: Time limit exceeded, ABAP performance

Postby Jarmo » Fri Apr 22, 2005 12:08 am

Hi,

I am running an ABAP program on my screen, and I get the following short dump:

Code: Select all
Time limit exceeded. The program has exceeded the maximum permitted runtime and has therefore been terminated. After a certain time, the program terminates to free the work processfor other users who are waiting. This is to stop work processes being blocked for too long by
- Endless loops (DO, WHILE, ...),
- Database acceses with large result sets,
- Database accesses without an apporpriate index (full table scan)
- database accesses producing an excessively large result set,
The maximum runtime of a program is set by the profile parameter "rdisp/max_wprun_time". The current setting is 10000 seconds. After this, the system gives the program a second chance. During the first half (>= 10000 seconds), a call that is blocking the work process (such as a long-running SQLstatement) can occur. While the statement is being processed, the database layer will not allow it to be interrupted. However, to stop the program terminating immediately after the statement has been successfully processed, the system gives it another 10000 seconds. Hence the maximum runtime of a program is at least twice the value of the system profile parameter "rdisp/max_wprun_time".

Last error logged in SAP kernel
Component............ "NI (network interface)"
Place................ "SAP-Dispatcher ok1a11cs_P06_00 on host ok1a11e0"
Version.............. 34
Error code........... "-6"
Error text........... "connection to partner broken"
Description.......... "NiPRead"
System call.......... "recv"
Module............... "niuxi.c"
Line................. 1186

Long-running programs should be started as background jobs. If this is not possible, you can increase the value of the system profile parameter "rdisp/max_wprun_time".

Program cannot be started as a background job. We have now identified two options to solve the problem:
- Increase the value of the system profile parameter "rdisp/max_wprun_time"
- Improve the performance of the following SELECT statement in the program:

Code: Select all
SELECT ps_psp_pnr ebeln ebelp zekkn sakto FROM ekkn
INTO CORRESPONDING FIELDS OF TABLE i_ekkn
FOR ALL ENTRIES IN p_lt_proj
WHERE ps_psp_pnr = p_lt_proj-pspnr
AND ps_psp_pnr > 0.

In EKKN we have 200 000 entries.

Is there any other options we could try?
Regards,
Jarmo

"Experience is a great teacher"
Jarmo
 
Posts: 70
Joined: Sat Mar 29, 2003 3:00 am
Location: Finland

Postby SAP_Basis_Chap » Fri Apr 22, 2005 1:31 am

A third option is to use summary tables, the ABAP forum is a better place for such discussions, here we stick to the simple stuff :wink:

You did not state a program, certainly if it is one of your own you need to do runtime analysis (SE30) or similar. It may be your DB statistics are out of date.

A quick nose at your code made me think you may have a lot of entries in PROJ as well. 200,000 entries will not in itself cause the timeout, analysis will show where the problem resides, perhaps it was trying to send some data back but had a network error as shown in your dump and that was the problem. Try running in background and if you get a message_X or dynpro_send_in_background dump then it is likely doing such a thing.
regards,
Chap
SAP_Basis_Chap
 
Posts: 1760
Joined: Fri May 23, 2003 5:33 am

Postby Snowy » Fri Apr 22, 2005 8:12 am

IF you go for option #1, continue to reply in this forum.

If you go for #2, use the ABAP forum.

My guess: go for option #2.

Snowy
SapFans Moderator

Search: http://www.sapfans.com/forums/search.php
Notes: http://service.sap.com/notes
Help: http://help.sap.com
Rules: http://www.sapfans.com/forums/viewtopic.php?t=344127
Snowy
 
Posts: 28695
Joined: Mon Oct 21, 2002 2:33 pm
Location: 3.1415926535

Postby Jarmo » Fri Apr 29, 2005 6:41 am

Thanks for your help!

I fixed it as follows:
Code: Select all
data p_lt_proj_sel like p_lt_proj.
p_lt_proj_sel[] = p_lt_proj[].
sort p_lt_proj_sel by pspnr.
delete adjacent duplicates from p_lt_proj_sel comparing pspnr.

Now the SELECT statement is much more efficient.
Regards,
Jarmo

"Experience is a great teacher"
Jarmo
 
Posts: 70
Joined: Sat Mar 29, 2003 3:00 am
Location: Finland


Return to Basis

Who is online

Users browsing this forum: Google [Bot] and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.