Show TOC

Soft Shutdown in SAP Application ServerLocate this document in the navigation structure

Concept

To ensure that no requests or data are lost when ending an SAP instance, use the “soft shutdown” function, also known as “graceful shutdown”. A soft shutdown waits for transactions to be ended in a certain order. Some of these states have a timeout (can be configured using profile parameters) and others do not.

Process

The following figure shows the process flow of the soft shutdown for a dual-stack instance (with Application Server ABAP and Application Server Java). If it is an AS ABAP instance without AS Java, the states J2EE_SHUTDOWN, WAIT_FOR_END_OF_J2EE, and J2EE_HARD_SHUTDOWN do not apply.

Figure 1: Soft Shutdown

The following overview describes the actions of the system in the various states.

State

Description

Wait Time

CHECK_SERVER

Check whether the server can be ended

Yes

CHANGE_STATE

Change of server state (can be seen in the server overview, transaction SM51) from active to shutdown.

No

WAIT_FOR_LOAD_BALANCE_UPDATE

Wait until the RFC/HTTP clients no longer consider the server for calls with load balancing. The wait time is restricted by the rdisp/shutdown/load_balance_wait_time parameter.

Timeout can be configured

J2EE_SHUTDOWN

End AS Java (JEE Engine) (if active)

No

DISABLE_EXTERNAL_LOGIN

Do not allow external logons (SAP GUI) if the parameter rdisp/shutdown/disable_gui_login = on is set

No

DISABLE_SCHEDULES

Deactivate internal scheduling (Batch-Jobs, BG-RFC, QRFC)

No

WAIT_FOR_END_OF_LONGRUNNER

Wait for the end of the long-runner (batch, update, and so on) (without timeout)

Yes

WAIT_FOR_END_OF_EXCLUSIVE_ACTIONS

Wait for the exclusive actions to start.

These are unique clean up actions in the SAP kernel and the ABAP runtime environment which are started when the shutdown starts.

The wait to read ABAP actions can be configured by the rdisp/shutdown/abap_trigger_timeout parameter.

Timeout can be configured

WAIT_FOR_END_OF_SESSIONS

Wait for the end of the active sessions. An automatic log off can be activated for online sessions by using the rdisp/shutdown/gui_auto_logout parameter. If soft shutdown is active, popups appear periodically in online sessions and request the user to log off. The frequency can be configured using the rdisp/shutdown/message_frequency parameter.

No

TERMINATE_PERIODIC_TASKS

All kernel-internal periodic tasks (for example AUTOABAP, BUFFER-REFRESH) are no longer started

No

WAIT_FOR_END_OF_J2EE

If AS Java is active, the system waits for AS Java to end, as triggered in the state J2EE_SHUTDOWN. The maximum wait time can be configured using the rdisp/shutdown/j2ee_timeout parameter.

Timeout can be configured

J2EE_HARD_SHUTDOWN

If active, AS Java is terminated with a hard shutdown

No

CLOSE_LISTEN_PORTS

Close ports to GUI, RFC, and HTTP communication

No

WAIT_FOR_IDLE_WPS

Wait until all work processes are in "waiting" status and there are no more requests in the dispatcher queue. The maximum wait time can be configured using the rdisp/shutdown/idle_wp_timeout parameter.

Timeout can be configured

HALT

End instance and clean up resources

No

Constraints

Since some states do not have a timeout, it cannot be guaranteed that the soft shutdown will terminate within a certain time span (sum of all timeouts).