Removing Inactive Sessions
"I connect to my customer over the Internet, running APPX on their Windows server. It works okay, but once in a while my APPX session just dies on my laptop. I guess it is timing out, or something.
Although I can start another APPX session and continue working, the previous session is still running on the server and has the process locked that I want to work on. What can I do to free up that process, given that I am running over the Internet?"
When you log on to the customer's server, write down the PID that appears on your APPX/Client screen in case your session dies. Next time you log on you could run a one line APPX subroutine "RUN kill <pid>". Note that you can only kill your own processes, unless you are an administrator.
The kill command may not be installed on the customer's server. If not, consider installing the cygwin utilities from
https://cygwin.com/index.html
If you go into Registration Usage at System Administration->System Setup->System Registration then click 'View Registration Usage', you can see the PIDs of registrations in use.
If Registration Usage contains entries for which there is no corresponding entry in the Task Manager's Processes list, you may want to set environment variable APPX_LS_GHOSTS=1, in order to instruct APPX to purge the dead entries. And/or delete $APPXPATH/0SA/Data/USAGE.dat and USAGE.key at will. Also see
Purging The USAGE File for a technique to trim the usage file on a running system
We have a record in a file that is reporting "locked" if you try to change it. No one is on it that we are aware. Hints for what to do? The user, running APPX Client, was in the middle of updating this record when her session "crashed".
The APPX session is probably still running on the server, and that's what's holding the record.
You need to do one of the following:
- Have a look at the registration usage to see if there is an orphaned session for that user. If you can find it, terminate it from Task Manager (Windows) or the command line (Linux/Unix).
- Reboot the server (simple, but drastic)
- On Windows, you can use Handle on the server and find the PID that has the file and terminate it. At the heart of it, Handle digs out the PIDs and the open files. You still have to parse through Handle, once you have it from
https://technet.microsoft.com/en-ca/sysinternals/bb545021.aspx
- Ask everyone to log off, stop the Login and License servers, and kill any remaining APPX sessions on the server. If there are background jobs running, it might be tricky to identify the background jobs from the ghost task.
- Identify the process id's of all currently connected clients (look in the title bar) and kill everything but those. Again, watch out for background jobs, if you use them at your site. Also, you might want to stop the Login service while you do this to prevent new users from logging on while you try to find the ghost process.
Comments:
Read what other users have said about this page or add your own comments.