Options

Client Idle timeout in NAV2015

PhennoPhenno Member Posts: 630
I have a strange issue with client idle timeout setup in NAV2015. If I set it to very low value (1 minute, for example) it works.
If I set it to 15 min (00:15:00), it doesn't work, client session remains active.

Furthermore, even if it is set to value that works (1 minute) it will not kill session that is idled on Home Screen. I suppose it is caused by ping function on notification form which contacts server every minute or so.

But my primar question is does anyone have idle client time out set on NAV2015?

Comments

  • Options
    PhennoPhenno Member Posts: 630
    P.S. I have tested with original database too to exclude customizations...
  • Options
    PhennoPhenno Member Posts: 630
    And last test shows that client idle time is working if it is set below or equeal to keepalive period for client, which is set to 2 minutes (default)...



  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    Haven't heard any problems related to this from our NAV 2015 implementations.

    Did you remember to restart the service after you changed the settings?
  • Options
    PhennoPhenno Member Posts: 630
    Yes, several times while testing. Also, it's happening on different platforms but with same build, from November.
  • Options
    PhennoPhenno Member Posts: 630
    edited 2016-01-04
    What's interesting is that "service operations/sec" shows a hit for keepalive packet, while on 2013 R2 it doesn't.

    On MSDN it's clearly stated that server operations will hit only on object execution.
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    If it's a problem or a bug, then submit a ticket on Microsoft. I'm sure others can benefit from your findings.
  • Options
    PhennoPhenno Member Posts: 630
    Well, before raising incident to MS I would like to confirm that it is not caused by my wrong setup, settings or user rights.

    Alex, can you confirm me the build on which it's working?
  • Options
    PhennoPhenno Member Posts: 630
    Alex,

    can you tell me your build version of NAV2015 on which this is working as intended, please?
  • Options
    PhennoPhenno Member Posts: 630
    edited 2016-01-09
    Well, after little digging I found out that this behaviour occurs after CU 12 (42951) applied. I've checked what were the platform changes in that CU and found an intersting line saying:
    375708 Connection cannot be resumed after the client has timed out.

    It seems to me that now they broke it to the level that client cannot timeout at all, if in idle state.

    Same correction was made to NAV2013 in CU 31 (42948), and to NAV2013 R2 in CU 24 (42950)

    I've checked latest CU and it still cannot timeout on idle.

  • Options
    radek.bbradek.bb Member Posts: 49
    Hi,
    Have you submitted the ticket to MS?
    I have the same issue with CU 14...
  • Options
    PhennoPhenno Member Posts: 630
    I have never submitted the ticket, though I contacted msdynnav support twitter account and got this reply:

    Not sure if this is official account...
  • Options
    radek.bbradek.bb Member Posts: 49
    Great... to make the server settings work I need to run around and change 500 client configurations... and if I decide to change the server setting again tomorrow - another round.
    Just faaaantastic.... :#
  • Options
    PhennoPhenno Member Posts: 630
    As I said, not sure if this twitter reply can be considered as an official comment to this issue but at this moment there is no other option than to change keepalive packet on every single computer.

    Can this be propagated from server if clients are installed with ClickOnce option or deployed through GPO?
  • Options
    radek.bbradek.bb Member Posts: 49
    It is about the principle - server settings should just work when you set them on server - the need to update all clients to benefit from server setting is just ridiculous.
    It is not rocket science... I would say a bit above kindergarden...

    I bet there is an idle counter at server side - which is cleared every time when receiving anything from client. And when they introduced idle messages from client - they just forgot to modify the logic of resetting idle counter - into something like: "every time when receiving anything except idle messages from client".

    Anyway:

    Ticket submitted... we will see how MS will respond...
  • Options
    PhennoPhenno Member Posts: 630
    I agree that idle timeout server setting in current setup is a quite misleading. Not sure if it is better to be differently, though, since now we can have users that are eligible for timeout and others that are not (maybe powerusers or admins etc.).

    Nevertheless, please inform us on Microsoft's reply on this.
  • Options
    radek.bbradek.bb Member Posts: 49
    Yep... they are happy with the way how it works now...
    So we have to learn to like "new" design...
  • Options
    PhennoPhenno Member Posts: 630
    It would be nice, then, if they update msdn documentation on this too...

    https://msdn.microsoft.com/en-us/library/dn789725(v=nav.90).aspx
    Configuring the inactive session timeout for the Microsoft Dynamics NAV Windows client
    When the Microsoft Dynamics NAV Windows client is inactive, the session will remain open until the time period that is specified by the ClientServicesIdleClientTimeout setting has passed, provided that the client has not been stopped or the connection to Microsoft Dynamics NAV Server has not been lost.
  • Options
    DoomhammerDoomhammer Member Posts: 211
    Hi, please can you help me with configuration of NAV 2016 service? customer wants to end inactive sessions after 12 minutes.
    Please see configuration file and tell me, what is wrong in it. Thank you in advance.

    <?xml version="1.0" encoding="utf-8"?>
    <appSettings>
    <add key="NetworkProtocol" value="Default" />
    <add key="DatabaseServer" value="NSERVER10" />
    <add key="DatabaseName" value="database" />
    <add key="DatabaseUserName" value="" />
    <add key="ProtectedDatabasePassword" value="" />
    <add key="EnableSqlConnectionEncryption" value="False" />
    <add key="TrustSQLServerCertificate" value="False" />
    <add key="ServerInstance" value="DynamicsNAV90" />
    <add key="ClientServicesPort" value="7046" />
    <add key="SOAPServicesPort" value="7047" />
    <add key="ODataServicesPort" value="7048" />
    <add key="ManagementServicesPort" value="7045" />
    <add key="ManagementServicesEnabled" value="True" />
    <add key="ClientServicesEnabled" value="True" />
    <add key="ReportPDFFontEmbedding" value="True" />
    <add key="CompileBusinessApplicationAtStartup" value="True" />
    <add key="SOAPServicesEnabled" value="False" />
    <add key="ODataServicesEnabled" value="False" />
    <add key="SOAPServicesSSLEnabled" value="False" />
    <add key="ODataServicesSSLEnabled" value="False" />
    <add key="DefaultClient" value="Windows" />
    <add key="ServicesOptionFormat" value="OptionCaption" />
    <add key="ServicesLanguage" value="en-US" />
    <add key="SOAPServicesMaxMsgSize" value="1024" />
    <add key="ServicesUseNTLMAuthentication" value="False" />
    <add key="ServicesDefaultTimeZone" value="UTC" />
    <add key="ODataServicesMaxPageSize" value="1000" />
    <add key="ClientServicesOperationTimeout" value="MaxValue" />
    <add key="ClientServicesProtectionLevel" value="EncryptAndSign" />
    <add key="MaxConcurrentCalls" value="40" />
    <add key="ClientServicesMaxConcurrentConnections" value="150" />
    <add key="ClientServicesReconnectPeriod" value="00:05:00" />
    <add key="ClientServicesIdleClientTimeout" value="00:13:00" />
    <add key="ClientServicesKeepAliveInterval" value="660" />
    <add key="ClientServicesMaxNumberOfOrphanedConnections" value="20" />
    <add key="ClientServicesCompressionThreshold" value="64" />
    <add key="MetadataProviderCacheSize" value="5000" />
    <add key="ClientServicesMaxUploadSize" value="30" />
    <add key="EnableDebugging" value="False" />
    <add key="DebuggingAllowed" value="True" />
    <add key="ClientServicesMaxItemsInObjectGraph" value="512" />
    <add key="ClientServicesChunkSize" value="28" />
    <add key="ClientServicesProhibitedFileTypes" value="ade;adp;app;asp;bas;bat;chm;cmd;com;cpl;csh;exe;fxp;gadget;hlp;hta;inf;ins;isp;its;js;jse;ksh;lnk;mad;maf;mag;mam;maq;mar;mas;mat;mau;mav;maw;mda;mdb;mde;mdt;mdw;mdz;msc;msi;msp;mst;ops;pcd;pif;prf;prg;pst;reg;scf;scr;sct;shb;shs;url;vb;vbe;vbs;vsmacros;vss;vst;vsw;ws;wsc;wsf;wsh" />
    <add key="NASServicesRunWithAdminRights" value="False" />
    <add key="NASServicesEnableDebugging" value="False" />
    <add key="NASServicesRetryAttemptsPerDay" value="3" />
    <add key="ClientServicesCredentialType" value="Windows" />
    <add key="UIElementRemovalOption" value="LicenseFileAndUserPermissions" />
    <add key="ServicesCertificateValidationEnabled" value="True" />
    <add key="EnableSoftwareQualityMetrics" value="False" />
    <add key="DataCacheSize" value="9" />
    <add key="SessionEventTableRetainPeriod" value="3" />
    <add key="SqlCommandTimeout" value="00:30:00" />
    <add key="BufferedInsertEnabled" value="True" />
    <add key="DisableSmartSql" value="False" />
    <add key="DocumentServicesProvider" value="SHAREPOINTONLINE" />
    <add key="EnableFullALFunctionTracing" value="False" />
    <add key="Multitenant" value="False" />
    <add key="CloseInactiveSqlConnectionsGeneration" value="10" />
    <add key="EnableALServerFileAccess" value="True" />
    <add key="EnableApplicationChannelLog" value="True" />
    <add key="EncryptionProvider" value="LocalKeyFile" />
    <add key="SqlParametersByOrdinal" value="True" />
    </appSettings>
    Martin Bokůvka, AxiomProvis
  • Options
    PhennoPhenno Member Posts: 630
    Martin,

    for idle timeout te be active your "ClientServicesKeepAliveInterval" has to be higher than "ClientServicesIdleClientTimeout".

    ClientServicesKeepAliveInterval is set in seconds and it says how ofter will client "ping" the server to say that it's alive. If user does something in client then it is obviously alive, but if not than NAV client every ClientServicesKeepAliveInterval number of seconds pings server. If client does not have any communication with server in ClientServicesIdleClientTimeout period then session is removed.

    In your case Keep alive interval is set to 11 minutes and IdleClient timeout to 13 so, client will never idle timeout.
  • Options
    DoomhammerDoomhammer Member Posts: 211
    I changed settings but did not work. Please can you take a look again? Thank you in advance
    <?xml version="1.0" encoding="utf-8"?>
    <appSettings>
    <add key="NetworkProtocol" value="Default" />
    <add key="DatabaseServer" value="NSERVER10" />
    <add key="DatabaseName" value="database" />
    <add key="DatabaseUserName" value="" />
    <add key="ProtectedDatabasePassword" value="" />
    <add key="EnableSqlConnectionEncryption" value="False" />
    <add key="TrustSQLServerCertificate" value="False" />
    <add key="ServerInstance" value="DynamicsNAV90" />
    <add key="ClientServicesPort" value="7046" />
    <add key="SOAPServicesPort" value="7047" />
    <add key="ODataServicesPort" value="7048" />
    <add key="ManagementServicesPort" value="7045" />
    <add key="ManagementServicesEnabled" value="True" />
    <add key="ClientServicesEnabled" value="True" />
    <add key="ReportPDFFontEmbedding" value="True" />
    <add key="CompileBusinessApplicationAtStartup" value="True" />
    <add key="SOAPServicesEnabled" value="False" />
    <add key="ODataServicesEnabled" value="False" />
    <add key="SOAPServicesSSLEnabled" value="False" />
    <add key="ODataServicesSSLEnabled" value="False" />
    <add key="DefaultClient" value="Windows" />
    <add key="ServicesOptionFormat" value="OptionCaption" />
    <add key="ServicesLanguage" value="en-US" />
    <add key="SOAPServicesMaxMsgSize" value="1024" />
    <add key="ServicesUseNTLMAuthentication" value="False" />
    <add key="ServicesDefaultTimeZone" value="UTC" />
    <add key="ODataServicesMaxPageSize" value="1000" />
    <add key="ClientServicesOperationTimeout" value="MaxValue" />
    <add key="ClientServicesProtectionLevel" value="EncryptAndSign" />
    <add key="MaxConcurrentCalls" value="40" />
    <add key="ClientServicesMaxConcurrentConnections" value="150" />
    <add key="ClientServicesReconnectPeriod" value="00:05:00" />
    <add key="ClientServicesIdleClientTimeout" value="00:10:00" />
    <add key="ClientServicesKeepAliveInterval" value="660" />
    <add key="ClientServicesMaxNumberOfOrphanedConnections" value="20" />
    <add key="ClientServicesCompressionThreshold" value="64" />
    <add key="MetadataProviderCacheSize" value="5000" />
    <add key="ClientServicesMaxUploadSize" value="30" />
    <add key="EnableDebugging" value="False" />
    <add key="DebuggingAllowed" value="True" />
    <add key="ClientServicesMaxItemsInObjectGraph" value="512" />
    <add key="ClientServicesChunkSize" value="28" />
    <add key="ClientServicesProhibitedFileTypes" value="ade;adp;app;asp;bas;bat;chm;cmd;com;cpl;csh;exe;fxp;gadget;hlp;hta;inf;ins;isp;its;js;jse;ksh;lnk;mad;maf;mag;mam;maq;mar;mas;mat;mau;mav;maw;mda;mdb;mde;mdt;mdw;mdz;msc;msi;msp;mst;ops;pcd;pif;prf;prg;pst;reg;scf;scr;sct;shb;shs;url;vb;vbe;vbs;vsmacros;vss;vst;vsw;ws;wsc;wsf;wsh" />
    <add key="NASServicesRunWithAdminRights" value="False" />
    <add key="NASServicesEnableDebugging" value="False" />
    <add key="NASServicesRetryAttemptsPerDay" value="3" />
    <add key="ClientServicesCredentialType" value="Windows" />
    <add key="UIElementRemovalOption" value="LicenseFileAndUserPermissions" />
    <add key="ServicesCertificateValidationEnabled" value="True" />
    <add key="EnableSoftwareQualityMetrics" value="False" />
    <add key="DataCacheSize" value="9" />
    <add key="SessionEventTableRetainPeriod" value="3" />
    <add key="SqlCommandTimeout" value="00:30:00" />
    <add key="BufferedInsertEnabled" value="True" />
    <add key="DisableSmartSql" value="False" />
    <add key="DocumentServicesProvider" value="SHAREPOINTONLINE" />
    <add key="EnableFullALFunctionTracing" value="False" />
    <add key="Multitenant" value="False" />
    <add key="CloseInactiveSqlConnectionsGeneration" value="10" />
    <add key="EnableALServerFileAccess" value="True" />
    <add key="EnableApplicationChannelLog" value="True" />
    <add key="EncryptionProvider" value="LocalKeyFile" />
    <add key="SqlParametersByOrdinal" value="True" />
    </appSettings>
    Martin Bokůvka, AxiomProvis
  • Options
    PhennoPhenno Member Posts: 630
    Martin,

    I also found later that on Home page of Role Center, there is a "timer" that pings server every 2 minutes (if I can recall correctly), so if user leaves NAV idled but on Home screen it will never timeout. For that you will need to disable that component on home screen or to make this ping larger that idle-timeout period. So, check if you were testing timeout by leaving NAV opened on home screen.

    Also, on previous CUs of that version of NAV, ClientServicesKeepAliveInterval parameter was set on client side i ClientConfiguration setting file. Check if that property is not set on client (not sure if NAV client will use it even if it's set there but, better to be sure).
  • Options
    DoomhammerDoomhammer Member Posts: 211
    On client side, keepaliveinterval is set to 120, I think, this value is OK. Am I right?
    Martin Bokůvka, AxiomProvis
  • Options
    PhennoPhenno Member Posts: 630
    No, since it is set to 2 minutes (120 seconds). I'm not sure if that setup should be at all on client's side since it can be set on server's side. The problem is that this setup is introduced in october 2015 (i think) and again changed few months later where server got its own setup.
    What build do you have on clients and server?

    At least you could try to set this to value higher that 10 minutes and then it should work for that client. But if you are on proper CU (build) it should work on all clients based on server settings.

  • Options
    DoomhammerDoomhammer Member Posts: 211
    Thanks for details. Our customer's version is 9.0.44365.
    I will change setting in one client config and try it.
    Timeout on client side was set by default, we did not modify it.
    Martin Bokůvka, AxiomProvis
Sign In or Register to comment.