eG Monitoring
 

Measures reported by AsAbapEnqStTest

The Enqueue service allows ABAP applications to lock data so that only they can use it. The locking of the data avoids parallel changes to the data, which would lead to data inconsistency. The enqueue work process is in charge of the lock management system. It allows multiple application servers to synchronize their access to the database and maintain data consistency. The locks are managed by the enqueue work process using a lock table that resides in the main memory. The enqueue work process sets an SAP lock by writing entries in the lock table; but prior to that, the enqueue work process checks the lock table to determine whether/not the requested lock object is already locked, and if locked, what type of lock is active on the object.

While SAP supports many types of locks, from a performance perspective, the following types are most critical:

  • Exclusive: Exclusive locks are used to avoid parallel modification of the data, which means that exclusively locked data can be displayed or modified by only one user.
  • Exclusive but not cumulative: Locks of this type can be called only once. So a lock request will be rejected if an exclusive lock already exists.

Too many exclusive locks held for long durations can be detrimental to SAP system performance, as they can block users from updating critical transactions. This is why, SAP administrators need to keep track of such locks, promptly detect unreleased locks, and figure out the reasons for the same. To enable this lock analysis, eG Enterprise provides the AsAbapEnqStTest test.

For each exclusive lock type (i.e., exclusive and exclusive but not cumulative), this test reports the number of locks of that type for which entries exist in the lock table and the number of locks that have remained active over different time periods ranging from 1 hour to over 1 day. In the process, the test points administrators to those lock types that were unreleased for significantly long time windows, thus impacting SAP system performance. Detailed metrics provided by the test will lead administrators straight to the exact locks that were held for broad time frames and the user who held them!

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
numLocks Indicates the number of locks of this type currently held. Number A low value is desired for this measure. Compare the value of this measure across lock types to know of which lock type are the maximum number of locks.
pctNumLock Indicates the percentage of total locks currently held that are of this type. Percent A low value is desired for both exclusive lock types. A high value indicates that a majority of the locks are exclusive locks, which is a cause for concern.
minsToHour Indicates the number of locks of this type that were held for a duration between 5 minutes to 1 hour. Number Normally, locks are automatically released when transactions are committed or when users finish working on the data. If locks remain unreleased for long time periods, it may not always be a cause for alarm, as it may be owing to something as routine as long-running background jobs that update the database. Some other times, unreleased locks can cause serious performance issues to the SAP system.

This is why, high values reported by any of these measures cannot be ignored. In such situations, it is best to immediately investigate the reason why locks were held for such a long duration. To know which precise locks were unreleased by which user and why, use the detailed diagnosis of this measure.

Some of the most common reasons for unreleased locks are as follows:

  • Abnormal termination of the SAP GUI: If users shut down their PCs without logging off SAP, or if the SAP GUI terminates for other reasons, such as network or communication problems, the user session may remain active in the SAP system. If this happens while the user had lock entries, sometimes these locks remain unreleased since the user is no longer active in the system. In these cases, you can manually release the lock by deleting it from the lock entry list, or you can force log off the user from the User Overview Monitor in the application server where the user was logged on.
  • Inactive SAP GUI: When users currently working on the system leave their presentation services with unfinished transactions, locks will not be released. You can release such locks by deleting them from the lock entry list, but only after confirming that they are not coming from important background jobs.
  • Problems in update processing: When there are update modules that are unprocessed by the syste, these modules do not release the locks. The update module releases the locks only when the update records have been completely processed or they have abnormally terminated with an error status. Only update modules with status INIT or AUTO can hold locks.
hourToDay Indicates the number of locks of this type that were held for a duration between 1 hour to 1 day. Number
moreThanDay Indicates the number of locks of this type that were held for over a day. Number