Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Purpose

This wiki helps to understand different reason for a normal work process termination.

Different normal behaviors on the system may lead to work process terminations that can be seen on transaction SM21:

To identify which is the reason for this terminations, we should check the information displayed on the work process trace file involved from the affected application server at that timestamp.

On the above example, it would be work process 0 so we should check on work folder file calleddev_w0

rdisp/wp_auto_restart was exceeded

1-   Dispatcher (dev_disp) :

DpHdlDeadWp: W0 (pid= <WPpid>) terminated automatically
DpWpDynCreate: created new work process W0-<WPpid>

2-   Work process (dev_w0) :

ThWpNeedsRestart: reached auto restart time (<parameter value> sec)
ThWpRestart: restart wp (pid=<WPpid>) automatically
Disconnecting from ALL connections:
..
***LOG Q02=> wp_halt, WPStop (Workp. 0 <WPpid>)

This restart is implemented in following way:

The work process checks after each change of the user context whether it has already exceeded the time interval set by parameterdisp/wp_auto_restart. If this is the case, work process is terminated and the Dispatcher starts a new work process. Therefore, the work process will not be shutdown forcibly afterrdisp/wp_auto_restartseconds. It will only shutdown at times where all work has been finished by the work process.

abap/heaplimit was exceeded

1-   Dispatcher (dev_disp) :

DpHdlDeadWp: W0 (pid= <WPpid>) terminated automatically
DpWpDynCreate: created new work process W0-<WPpid>

2-   Work process (dev_w0) :

WP has reached abap/heaplimit = <parameter value> bytes
..
ThWpNeedsRestart: abap strategy == kill, restart
ThWpRestart: restart wp (pid==<WPpid>) automatically
..
***LOG Q02=> wp_halt, WPStop (Workp. 0 <WPpid>)

This restart will be triggered if the work process has allocated, at least, the amount of memory defined in this parameter. When value defined byabap/heaplimitis reached, and work process has finished allocating the memory it needs until the execution of the task is completed, work process will be restarted. This work process automatic restart, is done to release the local memory that was occupied from the operative system's point of view. This is not an error and no action has to be performed.

See also Note:

2360519 - abap/heaplimit increased for kernel releases 7.42 and higher

Dynamic Work process is terminated after high load situations

There are two cases for this scenario

Case A - High load situation has been stabilized. When dynamic work processes are not needed anymore, the dispatcher terminates them.

Work process (dev_w0) :

ProcessHandler::handleRequest: received opcode DP_PROC_OPCODE_TERMINATE for W0, pid <WPpid>
ThWpRestart: restart wp (pid=<WPpid>) automatically
Disconnecting from ALL connections:
..
***LOG Q02=> wp_halt, WPStop (Workp. 0 <WPpid>)

Case B - rdisp/max_dynamic_wp_alive_time is exceeded for any of the dynamic work process

Work process (dev_w0):

ThWpHandleStateChange: max alive time for dyn W0, pid <WPpid> exceeded, terminate now
ProcessHandler::handleRequest: received opcode DP_PROC_OPCODE_TERMINATE for W0, pid <WPpid>
ThWpRestart: restart wp (pid=<WPpid>) automatically
Disconnecting from ALL connections:
...
***LOG Q02=> wp_halt, WPStop (Workp. 0 <WPpid>)

For both cases we can see the Dispatcher (dev_disp) :

DpWpCheck: dyn W0, pid <WPpid> no longer needed, terminate now
DpHdlDeadWp: W0 (pid=<WPpid>) terminated automatically

For more information, please see:

Dynamic work processes configuration

Operation mode change which requires reduction of Work process

1-   Dispatcher (dev_disp) :

DpWpConf: wp reconfiguration, stop W0, pid <WPpid>
..
DpHdlDeadWp: W0 (pid= <WPpid>) terminated automatically

2-   Work process (dev_w0) :

ProcessHandler::handleRequest: received opcode DP_PROC_OPCODE_TERMINATE for W0, pid <WPpid>
ThWpRestart: restart wp (pid=<WPpid>) automatically
Disconnecting from ALL connections:
...
***LOG Q02=> wp_halt, WPStop (Workp. 0 <WPpid>)>)

Work process will be terminated in an operation mode switch, in the case where the new operation mode is set with a lower number of total active work process.

For more information, please see:

Operation Modes

2190597 - Work Process Configuration - Best Practices

rdisp/os_heap_for_restart was exceeded

1-   Dispatcher (dev_disp) : 

DpHdlDeadWp: W<nr> (pid= <WPpid>) terminated automatically
DpWpDynCreate: created new work process W<nr>-<WPpid>

2-   Work process (dev_<nr) : 

M  ThWpNeedsRestart: os heap usage <value> max os heap limit <value of rdisp/os_heap_for_restart>
M Top 50 PROC memory consumers by user tag ID (in bytes) M
M Tag Allocations          Smallest      Biggest        Sum
..
M  ***LOG Q02=> wp_halt, WPStop (Workp. 7517956872) [dpuxtool.c   316]

Each work process checks its heap consumption at operating system level before it accepts a new request. If the consumption exceeds the value that is set using the profile parameterrdisp/os_heap_for_restartit restarts automatically.

For more information see:

2249313  -  Memory leak analysis

 

 

 

  • No labels