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

Parallel processing issue RESOURCE_FAILURE (Even work processes available)

former_member594765
Discoverer
0 Likes
4,304

Hi ABAP Experts,

I am facing an issue in parallel processing. I implemented parallel processing as explained below.

Inside DO loop, I am calling a custom function module (RFC enabled) with the addition STARTING NEW TASK DESTINATION DEFAULT.

If any exception comes while calling the FM, waiting for 1 second and continuing. So that in next iteration FM will be called for same set of data.

If no exception comes then increment some variables so that, in next loop iteration the FM will be called for next set of data.

and I implemented the code in such a way to restrict the utilization of Dialogue work processes to 50% of all application servers.

The issue I am facing is:

after opening ~1000 new tasks (all opened processes are finished), I am getting exception "RESOURCE_FAILURE" continuously (Always) even though Dialogue work processes are available. So that the program is stuck in the DO loop.

Could anybody please tell me the reason, why we are getting exception RESOURCE_FAILURE even though dialogue work processes are freely available in the system.

Thanks in advance.

Regards

Suresh

2 REPLIES 2
Read only

matt
Active Contributor
0 Likes
2,450

and I implemented the code in such a way to restrict the utilization of Dialogue work processes to 50% of all application servers.

How did you do that, exactly?

Read only

former_member594765
Discoverer
0 Likes
2,450

1. Called FM "STUM_WP_TOTAL_ACTIVITY" to count total number of dialogue work processes.

2. Divided it by 2 to get 50% and store it in variable ex: lv_max_proc.

4. Initialize variables lv_process_open = 0, and lv_process_close = 0.

5. Increment the variable lv_process_open by 1 after successfully calling the FM in new task.

6. Increment the variable lv_process_close in subroutine that is calling on end of task.

7. Insert below code in the Do loop where we are calling the FM with addition starting new task.
WAIT UNTIL lv_max_proc >= (lv_process_open - lv_porcess_close).