This is a real head scratcher! - Server killing sessions

djdave
Member Posts: 11
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:
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
Best Answer
-
We think we solved this! it was some SQl job from a third party tool monitoring SQL sessions0
Answers
-
We think we solved this! it was some SQl job from a third party tool monitoring SQL sessions0
-
Hi,
I am having this exact same issue! Session randomly dying. Can you please tell me how you fixed it?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions