Idle session termination

Forum / NoMachine Cloud Server Products / Idle session termination

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12379
    wrimet
    Participant

    I see that it’s possible to have sessions automatically disconnect after a chosen idle interval, per this KB article.  The disconnected sessions keep running, per design.  For our use case, we would like to have idle sessions terminate after 60 minutes of inactivity.  This is because the our application software only allows one running instance per server – having the session sit disconnected will prevent the next user from launching the application software.

    One possible approach is to set something like this in node.cfg:

    DisplayAgentExtraOptions “-timeout 3000”  # disconnect after idle for 50 minutes
    EnableAutokillSessions 1
    DisconnectedSessionExpiry 600  # terminate disconnected sessions after 10 minutes

    But this constrains other uses for disconnected sessions (e.g. user taking a “bio-break”).

    I suppose the more general question is – is there a way to set a maximum idle session duration, after which it gets terminated?

    #12420
    brotech
    Participant

    There is no a automatic way to terminate idle sessions at the moment, so we’re evaluating whether to insert a Feature Request into our roadmap.

    You could set DisablePersistentSession “username” key in server configuration file, but then every network disconnection of that user will terminate a session, which doesn’t seem to be helpful in your case.

    # Disable persistent sessions for users. If the option is followed by
    # the keyword ‘all’, no user is allowed to run persistent sessions. Al-
    # ternatively, the option can be followed by a list of comma-separated
    # usernames. The default value is the empty string which corresponds
    # to disabling persistent sessions for no user. The values specified
    # override the values set for the ‘EnablePersistentSession’ key.
    #
    #DisablePersistentSession “”

    By default NoMachine sets: #EnablePersistentSession all

    Alternatively, you could try switching the –timeout values for ‘AgentExtra’ key, and ‘DisconnectedSessionExpiry’ , so decrease the value for disconnect on idle, and increase the time how long session could be disconnected. Again, it’s not optimal, but it might help.

     

     

     

     

    #12525
    wrimet
    Participant

    Thanks for the follow-up.  Unfortunately we need to allow persistent sessions in this case.  I think with tuning these two timeouts we can find our happy balance.

Viewing 3 posts - 1 through 3 (of 3 total)

This topic was marked as solved, you can't post.