cancel
Showing results for 
Search instead for 
Did you mean: 

Session Lock Exception

Former Member
0 Kudos

I getting following error while running the application

com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_34 failed to acquire exclusive lock on client session ClientSession(id=(J2EE3167300)ID1864495250DB10228320696692062728End_1165247860). Existing locks: LockingManager(ThreadName:SAPEngine_Application_Thread[impl:3]_34, exclusive client session lock: ClientSessionLock(SAPEngine_Application_Thread[impl:3]_50), shared client session locks: ClientSessionSharedLockManager([]), app session locks: ApplicationSessionLockManager([]), current request: local/SupportDeskHomePage/Support_Desk_Home).Hint: Take a thread dump of the server node to find the blocking thread that causes the problem.

what may be the problem?

Accepted Solutions (0)

Answers (3)

Answers (3)

hemanth2
Product and Topic Expert
Product and Topic Expert
0 Kudos

hi arun,

As the note 1234847 explains,s soon as a request for a user session is processed, the user session is blocked for the duration of the request i.e. there is always at most one thread that has acquired

the lock of a user session.

Concurrent requests which refer to the same user session (i.e. triggered from the same browser process) are serialized and processed one after each other. If there is a request which blocks or hangs due to some waiting/blocking condition, then other concurrently incoming requests are waiting for a certain period of time that the user session lock is

released. If they can't acquire the user session lock after this time interval, the waiting thread terminates with a LockException error page.

In such cases, the "sap.locking.maxWaitInterval" is helpful. Depending on the requests, administrators can increase it.

In previous cases, we have had customers increase it from 100s to 300s (or 500s) in the Web Dynpro default.properties, depending on their need. This will not make the server processing time slow, but there will be an extra buffer time so that the user request can pass through.. Customers vary the values of the parameter depending on the long running

applications. More information is available :

http://help.sap.com/saphelp_nwce71/helpdata/en/43/8a1a8ece230c8ce1000000

0a11466f/content.htm

SAP note 1113811 also provides some info..

However, if even after increasing this parameter, if there are locking issues, then this can be due to a application error. You will

need to anayse a thread dump to check the status of the threads during the locking process. As you are aware, it is the java threads that are responsible for the actual carrying out of the server tasks, akin to

the ABAP work processes.

SAP Note No. 710154-How to create a thread dump for the J2EE Engine

Hope this helps!

Kind Regards,

Hemanth Kumar

SAP ACTIVE GLOBAL SUPPORT

Former Member
0 Kudos

Hi Arun,

If the system is hanged you can restart the server0 (or server<n>) node to resolve the issue, but the issue may recur. Permanent solution is described in the note 1234847. There is a ppt attached to the note, you can proceed as described there.

Former Member
0 Kudos

As per hint, take thread dump using JCMON and analyse it through thread dump analyzer ( you can search from SDN and download it on your machine). When you run the analyzer, you will be able to see the threads that are on hold becuase of the lock of the problematic thread.

This is only for identifying the issue. In order to fix it, you need to restart the server. If the issue is with the application, you will have a same issue again until you fix the code. We had few issues like that with the custom code and I had to work with the developer to fix it.

Thanks!

Former Member
0 Kudos

Have you deleted the locks from system administration->Monitoring and under portal check object locking. see if there are any locks and see if you could delete the locks.