Question Progress Client Timeout On 9.1e And Oe11.6

Do we have a client timeout parameter in 9.1E (Unix) and 11.6 (Linux) from progress side? My requirement is if a user is not active for more than 1 hour I have to kick out that 'mprof' session. We use Putty to connect. Do I need to use time out option on putty? - not sure if that will end the 'mprof' process. Do we have a better option?

I got an article from progress but it's more from a db perspective and not from a session perspective. (Progress KB - How to use the ClientTimeOut Startup Parameter.)
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The client timeout parameter in the article you referenced is only supported for Windows database servers.

I believe you would have to code this yourself. But what you implement would depend on how you define an inactive user. Is a user "inactive" if they are perhaps using the client application but not doing database I/O? Or are they inactive if they are perhaps navigating the UI but not in a transaction? Or some other definition?

Are these clients self-service or remote?
 
Are these clients self-service or remote?
Self Service. We do SSH to the Unix Box using Putty and connect to the DB that resides on the same box using a wrapper script that runs mpro command.

We are looking for an option where we can find users who are not using the application (not even navigating the UI), say may have left it open at end of the day or for long lunch hours without any activity at all.
 
Self Service. We do SSH to the Unix Box using Putty and connect to the DB that resides on the same box using a wrapper script that runs mpro command.

We are looking for an option where we can find users who are not using the application (not even navigating the UI), say may have left it open at end of the day or for long lunch hours without any activity at all.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
For session duration you can look at _Connect._connect-time ("Login time"). It is a character value that looks like this: "Thu Dec 1 18:05:24 2016". but with a bit of code you can turn that into a datetime and subtract it from NOW to get the database session connection time in milliseconds. If you have a business rule that says all interactive self-service users should be logged out within x minutes after a certain end-of-business time, and you only want to know about time between database accesses, then this approach will work.

But this approach won't tell you what connected users are doing, e.g. if they're using the UI. You can sample _UserIO to see if their DB I/O changes between samples, but again that will give false positives for active users who aren't hitting the database. As suggested in this article you could enable client statement caching and look at changes in the users' call stacks (only in 10.1C+), but I wouldn't do that. First, it's a bit risky to leave it enabled all the time, especially if you use "stack" instead of "single". Second, it's a performance hit. Third, the clients only send their call stack to the server when they do database I/O, so it would be updated at the same time as _UserIO.

I suspect that trying to get more info from the client on what it's doing, even between database accesses, would require changing its UI/business logic. In that case the solution might be more invasive than the problem.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Also, if you do intend to do something about "inactive" self-service users programmatically, be sure to disconnect them from the database(s) and ensure that they complete any transaction rollback and disconnect before attempting to do anything at the OS level like kill the process. Killing a self-service client that has locked a shared memory latch will trigger an abnormal database shutdown.
 

TomBascom

Curmudgeon
This is one of those "requirements" that seems superficially obvious and easy but which is actually not at all obvious or easy.

You can also very easily shoot yourself in the foot trying to implement it.

If the user is truly idle then they are probably doing no harm and should probably just be left alone. (The main exceptions being users holding transactions open or locking records - neither of which should ever span UI... so the *correct* fix for that is to fix the code...)

If the user is doing something harmful then that harmful thing should be specifically identified and handled appropriately - not via some vague, all inclusive "idle users are bad" dictate.
 

RealHeavyDude

Well-Known Member
I can only second that. Users that are just connected to that database do no harm at all. Why kick them out in the first place? Plus, how would you define idle.
I know it is a popular requirement from people that have no glue what they are rquire you to do ( external auditors for example might require this because users do not lock their screen when thery are leaving their work place ( going for lunch ) thus leaving the application ready to take input from anybody that just walks by ... ).

It is the users ( or processes ) that do harm to your database that you want to kick out.

Heavy Regards, RealHeavyDude.
 

cj_brandt

Active Member
If fixing the code isn't an option and you still want to remove idle users holding an active transaction, you should get a list of users with an active transaction not all database users. The different flavors of linux or unix will provide an OS command to tell you how long a user is idle.

One problem with this approach is if a user kicks off a large batch process that takes more than an hour to finish. After one hour, the session would appear as holding a transaction and it could also appear as idle. Rather than kill the user, an alert could be sent after an hour showing the user and their transaction.
 
@Rob Fitzpatrick @TomBascom @RealHeavyDude @cj_brandt - I agree to the comments that are been provided.

Let me give the background of why my client need this. They have currently 200 user licenses and after migration looks like the number of users are going to increase more than 200 but at any given point of time there wont be more than 200 users unless users leave their sessions open for end of the day. We are trying to sort out this situation and looking at all possible work arounds. If in case we don't have any other work around we may have to purchase additional user licenses (may be 25 more - not 100% sure).
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
This is a little off-topic, but it might be worth giving some thought to your license model as you move to 11.6. Some models have come and gone since the 9.1E days. Depending on your client's needs and usage, a newer model like Named User or Registered Device might be more cost-effective. Also, such a change might make enforcement more straightforward. For example if you are licensed for N named users and you programmatically restrict users to a single session each, you can configure your application to allow connections by N users without having to worry about the game of musical chairs where one user can steal a spot from another. Food for thought.
 
Top