I've been rattling my head over this for best part of a year, and its known to have been occurring for longer .. Essentially we have LS retail running on NAV 2017 (CU5) and every 7-10 days (no obvious frequency) the LS Retail scheduler service tier gets its SQL session killed. The only common factor is it usually occurs at around 2am, we have looked at moving other jobs like backups etc but it still occurs. The message we receive is as per below, I'm just wondering if there is anywhere I can see what criteria is being considered to class it as "inactive" ? Is this the NAV exe making this decision ?
Server instance: LIVE_LS_SCHED
Category: Security
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 200c1f5d-672a-418c-995f-41b45a7a8bf5
ServerActivityId: 44bfcd45-a5ae-44fb-b0f3-c09ea680efe8
EventTime: 09/16/2023 01:03:19
Message <ii>(NavServerSessionRemovedException): <ii>The server stopped the session (ID: 7) because the session is no longer active.
ExceptionStackTrace:
CallerStackTrace:
at Microsoft.Dynamics.Nav.Runtime.NavSession.ValidateSessionIsActive(Boolean forceValidation)
at Microsoft.Dynamics.Nav.Runtime.NavSession.ValidateUserHasAccessToCompany(String companyName)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.GetCompanyNameToken(DataError errorLevel, String companyName, Int32& token)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.Initialize(String companyName, SecurityFiltering filtering)
at Microsoft.Dynamics.Nav.Runtime.NavRecord..ctor(ITreeObject parent, Int32 tableId, NCLMetaTable metaTable, Boolean isTemporary, NavRecord sharedTable, String companyName, SecurityFiltering securityFiltering)
at Microsoft.Dynamics.Nav.BusinessApplication.Record10012209.__Construct(ITreeObject parent, NCLMetaTable metaTable, Boolean isTemporary, NavRecord sharedTable, String companyName, SecurityFiltering securityFiltering)
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.CreateObjectInstance(ITreeObject parent, Boolean isTemporary, NavRecord sharedTable, String companyName, SecurityFiltering securityFiltering)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.CloneRecord(ITreeObject parentOfClone, Boolean reset, Boolean keepCompany)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.DeleteAll(Boolean runApplicationTrigger)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.CheckRemainingDays_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.CheckRemainingDays(NavCode itemNo, NavCode variantCode, NavCode locationCode, NavDate fromDate, INavRecordHandle replOutOfStockLog)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.UpdateOutOfStockLog_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.UpdateOutOfStockLog(Int32 lastItemLedgerEntryProcessed, ByRef`1 lastEntryProcessedNow, ByRef`1 noOfEntr)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit10012203.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.RunCodeunit(DataError errorLevel, Int32 objectId, NavRecord record)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001467.RunScheduleJob_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001467.RunScheduleJob(INavRecordHandle scheduleHeader, Boolean createLog)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001467.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001469.Schedule_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001469.Schedule()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001469.OnRun_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit99001469.OnRun(INavRecordHandle εrec)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavCodeunit.InvokeRun(Int32 objectId, Object[] args)
at Microsoft.Dynamics.Nav.Runtime.ALSession.RunCodeunitAndDisposeSession(NavSession session, Int32 codeUnitId, NavRecord record)
at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass1_0.<RunTask>b__0()
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
</ii></ii>
ProcessId: 3120
Tag: 000001W
ThreadId: 26
CounterInformation:
0
Answers
I am having this exact same issue! Session randomly dying. Can you please tell me how you fixed it?