You are currently reviewing an older revision of this page.
Sometimes when a user has a slow query or allows their smart-client desktop computer go to sleep, their session in APM goes stale but the smart-client session appears open and unresponsive. Occasionally these user use the Windows Task Manager to kill the client session on their local machine, this leads to stale sessions in the APM database for that user. Stale sessions are usually cleaned up when the Application server tries pinging the smart-client session and receives no response. However, when a user launches a new APM smart-client session immediately or within minutes of executing the Windows Task Manager to "End Task" the original APM Smart-client session what ends up happening is that a second session is created in the database for that user, a live session and a stale session. Stale sessions may also result from leaving open dialogues in APM and executing a Windows Task Manager "End-Task" or a variety of other reasons.
When users has a stale session in APM that has not be cleaned they will find the following error in the error log from the application server:
Fatal SERVERNAME\username Ivara.OTAssert [11] File: f:\src\hotfixes\7.11.0.208\apm\framework\oqpers\database.cpp(1423) : oDatabase::lockObject(..) - GetAppLock(..) returned -1!
Note when a user has a stale session, they may not initially know as the client may still be running but eventually when they try to enter transactions or save changes they will receive error messages from APM.
Close open smart-client sessions. Stop the APM Server(s) services, application server/action scheduler, etc. Wait for the sessions to end completely and close in the windows task manager on the server. Restart all the services, once these services are restarted they clear all stale sessions.
Improvements to stale session handling are delivered in release 7.12.1 and 7.12.2. In release 7.12.1 stale sessions are easier to diagnose in that "Stale session" will be written in the logs. In release 7.12.2, many of the sources of stale sessions have been repaired.