Disable user inactivity timeout

I've set the idle timeout in IIS on the App Pool to be 0 and for good measure I've set the time out action to be suspend. I've set the recycling so it is off. In CRM, under the administration -> users -> user configuration, the idle timeout is set to 240. If I want to disable the timeout in CRM, does setting it to 0 do that? I'm sure it does, but the help file doesn't say. All it says is this:

The inactivity period (in minutes) after which a user is automatically logged out of Sage CRM.

Sage CRM uses the value in this field only if it is less than the value in Idle Time-out (minutes) specified for the Sage CRM application pool in Microsoft Web Server (IIS). The default idle time-out value set for the Sage CRM application pool is 120 minutes.

The help file doesn't say how to disable the timeout. Also, I assume that setting the value in CRM to a value higher than the app pool timeout will be pointless as the app pool will suspend or kill the process anyway?

A common question I get asked is how to stop CRM booting you out after a period of inactivity. IE stop it completely. Anyone? This is CRM 2020.

  • 0 is infinate (no kick out)

    The app pool should (in theory never shut down to inactivity due to services etc)

    What you might fall foul of is app pool recycling. As standard this is 1740 minutes (29 hrs) so will walk into a business working day. Change this to fixed and schedule outside working hours.

  • In IIS under the app pool advanced settings there are 2 settings. One is the idle timeout in minutes and the second one is idle timeout action, which by default is set to Terminate. I've set this to 0 which means it doesn't time out and any action should it decide to override that setting is set to Suspend. I know these settings and I know the recycle settings which I've dealt with. It was just the timeout in CRM as the help file doesn't say how to effectively disable it. I've now set this to 0 so hopefully that will resolve the matter. Thanks for clarifying.

  • Nope. The user still gets kicked out.

  • Ok, there is something going on here.

    I set the user inactivity timeout to 0 and saved it. It shows on the screen as 0 and in the database it is 0. If I navigate away from that screen and come back, it is 30.

    If I log out and do an IIS Reset the value in the database is still 0. On first login, by the time I have logged in, the value has changed to 30. I ran SQL profiler to see when this change happened and the system sets it to 30 if it is 0 during the initial login.

    I thought I'd see what happens when (or if) I set the user activity timeout to -1. CRM allows this. However, as soon as you do any action and click on anything it logs you out. You can't log back in either. Resetting IIS and logging back in, the value stays at -1.

    I have logged both issues with Sage and I have set the user inactivity timeout to 1440.

    The upshot is, setting the user inactivity timeout to -1 is a handy way of locking the system for more than the "Lock System" allows you to do.

  • This may be seen as unconventional by a lot of IT shops, but having worked with Windows servers for a couple of decades, I've always found it helpful to schedule a server reboot, say at 2 AM.  This ensures that any programs that are experiencing problems, e.g. memory leaks, will get fully refreshed for the next day's CRM users.  Similarly, certain types of configuration changes might require an IIS reset, but they might not be urgent.  So rather than disrupt all of your CRM users in the middle of the day, you can just make the change and then let the server reboot implement them.  

    As for the CRM and Rewriter App Pool settings, I go with:

    • Idle Time-out (minutes): 0
    • Regular Time Internal (minutes): 0

    In CRM, the User Inactivity Timeout (minutes) is set very large: 900, so every 15 hours a user session will abort.  

    As I say, rebooting servers nightly (or weekly) is not always popular with IT folks, but:

    • there's no good reason not to do it
    • most importantly, it works like a charm.