web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Web Client Timeout in NAV 2018 Extension/AL

(0) ShareShare
ReportReport
Posted on by 115

This is for NAV 2018 up to CU04 (build 21441), on premises

I have been having a problem that I thought related to the HttpClient type but appears to be a time out problem. I have increased all the timeouts in the service's customsettings.config file and the default timeout in the navsettings.json file is 20 minutes. However my process times out right about 2 minutes.

I have a process that calls a web service (REST) repeatedly to download data and it takes about 2.5 minutes to do so in C/AL and the AL code fails every time.

What is timing out?
What do I need to change to extend the timeout?

The code below duplicates the problem.

pageextension 50100 CustomerListExt extends "Customer List"
{
    trigger OnOpenPage();
    begin
        //Message('App published: Hello world');
        if Confirm('Run test?', false) then begin
            TestTimeOut();
        end;
    end;

    procedure TestTimeOut();
    var 
        startTime: DateTime;
        endTime: DateTime;
        Window: Dialog;

    begin
        Window.Open('Elapsed time: #1#############################');
        startTime := CurrentDateTime;

        while true do begin
            sleep(10000); //10 seconds
            endTime := CurrentDateTime;
            Window.Update(1, endTime - startTime);
        end;
    end;
}

*This post is locked for comments

I have the same question (0)
  • GreatScott001 Profile Picture
    115 on at

    FYI, the extension run from the RTC will run for as long as I leave it (more than 10 minutes has been tested).

  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at

    Check this 2 parameters on NAV instance:

    timeout.JPG

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Normally all is managed by the settings suggested by Andrey. Change that and restart the service.

  • GreatScott001 Profile Picture
    115 on at

    As noted, I have extended all the timeouts I can find.  Restarted everything (servers, services) multiple times and still experience this.  Any other suggestions?

  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    If so, I think it could be helpful to see your code.

  • GreatScott001 Profile Picture
    115 on at

    Here is the CustomSettings.config

    <?xml version="1.0" encoding="utf-8"?>
    <appSettings>
      <add key="NetworkProtocol" value="Default" />
      <add key="DatabaseServer" value="navdev1" />
      <add key="DatabaseName" value="Demo Database NAV (11-0-21441 GB)" />
      <add key="EnableSqlConnectionEncryption" value="False" />
      <add key="TrustSQLServerCertificate" value="False" />
      <add key="ServerInstance" value="AL21441" />
      <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="DeveloperServicesPort" value="7049" />
      <add key="DeveloperServicesEnabled" value="True" />
      <add key="DeveloperServicesSSLEnabled" value="False" />
      <add key="ExtensionAllowedTargetLevel" value="Internal" />
      <add key="ReportPDFFontEmbedding" value="True" />
      <add key="EnableSaveToWordForRdlcReports" value="True" />
      <add key="EnableSaveToExcelForRdlcReports" value="True" />
      <add key="EnableSaveFromReportPreview" value="True" />
      <add key="CompileBusinessApplicationAtStartup" value="True" />
      <add key="SOAPServicesEnabled" value="False" />
      <add key="ODataServicesEnabled" value="False" />
      <add key="ODataServicesV3EndpointEnabled" value="True" />
      <add key="ODataServicesV4EndpointEnabled" value="True" />
      <add key="SOAPServicesSSLEnabled" value="False" />
      <add key="ODataServicesSSLEnabled" value="False" />
      <add key="ODataMaxConnections" value="0" />
      <add key="PublicWebBaseUrl" value="localhost/.../webclient" />
      <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="1000" />
      <add key="ClientServicesMaxConcurrentConnections" value="500" />
      <add key="ClientServicesReconnectPeriod" value="00:10:00" />
      <add key="ClientServicesMaxNumberOfOrphanedConnections" value="20" />
      <add key="ClientServicesCompressionThreshold" value="64" />
      <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="EnableDeadlockMonitoring" value="True" />
      <add key="NASServicesEnableDebugging" value="False" />
      <add key="ClientServicesCredentialType" value="Windows" />
      <add key="UIElementRemovalOption" value="LicenseFileAndUserPermissions" />
      <add key="ServicesCertificateValidationEnabled" value="True" />
      <add key="DisableTokenSigningCertificateValidation" value="false" />
      <add key="DataCacheSize" value="9" />
      <add key="SessionEventTableRetainPeriod" value="3" />
      <add key="SqlCommandTimeout" value="00:60: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="SqlConnectionIdleTimeout" value="00:15:00" />
      <add key="EnableALServerFileAccess" value="True" />
      <add key="EnableApplicationChannelLog" value="True" />
      <add key="EncryptionProvider" value="LocalKeyFile" />
      <add key="EnableMembershipEntitlement" value="False" />
      <add key="MaxRowsToExportToExcel" value="MaxValue" />
      <add key="EnableTaskScheduler" value="True" />
      <add key="TaskSchedulerMaximumConcurrentRunningTasks" value="10" />
      <add key="ClientServicesKeepAliveInterval" value="00:10:00" />
      <add key="UseSimplifiedFilters" value="False" />
      <add key="DisableWriteInsideTryFunctions" value="True" />
      <add key="ExtendedSecurityTokenLifetime" value="0" />
      <add key="ClientServicesIdleClientTimeout" value="MaxValue" />
      <add key="ODataEnableExcelAddInAnnotations" value="True" />
      <add key="NavHttpClientMaxResponseContentSize" value="256" />
      <add key="NavHttpClientMaxTimeout" value="00:15:00" />
      <add key="SqlParametersByOrdinal" value="True" />
      <add key="ClientBuildRestriction" value="WarnClient" />
      <add key="TraceLevel" value="Normal" />
      <add key="EnableDataExportImport" value="True" />
      <add key="AllowSessionCallSuspendWhenWriteTransactionStarted" value="True" />
      <add key="MaxStreamReadSize" value="1000000" />
      <add key="ApiServicesEnabled" value="False" />
      <add key="EnableSymbolLoadingAtServerStartup" value="True" />
      <add key="SqlLongRunningThreshold" value="1000" />
      <add key="UseIncrementalCompanyDelete" value="true" />
      <add key="TaskSchedulerSystemTaskStartTime" value="00:00:00" />
      <add key="TaskSchedulerSystemTaskEndTime" value="23:59:59" />
      <add key="XmlMetadataCacheSize" value="500" />
      <add key="AllowSessionWhileSyncPending" value="false" />
    </appSettings>
  • GreatScott001 Profile Picture
    115 on at

    The EXACT code that I am running right now is in my original post.  Setup an AL project and test it.

  • Andrey Baludin Profile Picture
    3,941 on at

    How code from original post relates to http client?

  • GreatScott001 Profile Picture
    115 on at

    It doesn't but then HTTPClient wasn't the problem.  It just looked like it.  After narrowing down everything I have distilled the issue to timeout not any particular action or function.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans