NAV 2017 CU10: Event 705 Long Running SQL statement

vaprog
Member Posts: 1,162
Hi
I have a demo setup on my client of NAV 2017 CU10. NST, SQL, Client, Dev. Environment all local; demo database with CRONUS company.
My system regularly logs the following event
I cleared out a stale entry in the Active Session table, that shipped with the demo database. The Session Event Table, that is frequently named in connection with that event contains about 30 to 50 records.
What might be causing this event and how do I stop NAV from spamming my event log?
I have a demo setup on my client of NAV 2017 CU10. NST, SQL, Client, Dev. Environment all local; demo database with CRONUS company.
My system regularly logs the following event
Server instance: DynamicsNAV100 Category: Sql ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: 00000000-0000-0000-0000-000000000000 ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000 ServerActivityId: 00000000-0000-0000-0000-000000000000 EventTime: 03/16/2018 15:00:07 Message <ii>Threshold Trace Tag. Execution Time = 1259 milliseconds Long Running SQL statement Task ID:9 </ii> ProcessId: 6296 Tag: 000007S ThreadId: 18 CounterInformation:The event is logged every 30 seconds + Execution Time, as stated in the event message.
I cleared out a stale entry in the Active Session table, that shipped with the demo database. The Session Event Table, that is frequently named in connection with that event contains about 30 to 50 records.
What might be causing this event and how do I stop NAV from spamming my event log?
0
Comments
-
Personally I think the default set threshold is a bit too low. You can set the threshold higher in the NST configuration file:
<add key="SqlLongRunningThreshold" value="1000" />
Usually the warning contains the query that is running long. Do you have anything like that in the warning? That would be helpful to further analyze what is causes the warning.
You could use the SQL Profiler on the database to check for long running queries too.0 -
One of the reasons I can think of is locking. It does not seeem to make much sense in demo environment like yours to blame locking but maye you have Task Scheduler enabled, or some web services connections, and the environment is slow - maybe this all together adds up to slow Active Session queries down to the point where NST records long running queries.
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Thanks for your replies.
I did not know about the configuration option. That should help me to silence the NST in case the cause cannot be found.
I mentioned, that my entries occur regularly (i.e. 30 seconds after after the last he next one begins).
I did not mention- The event is logged even if the NST is (supposed to be) idle
- The event is logged even if no one is connected
- no one other thy I connects to the service (according to Session Events table)
- There are two jobs in the Job Queue, each running once every 24 hours, running for some milliseconds. One of them probably is on the edge of triggering the event, but can do so only every 24 h not every 30 s
0 -
@Slawek_Guzek, True. The fact that a queries duration is above the 1000ms it doesn't necessarily mean the query it self takes that long to process. There could be other reasons the duration for that query is over 1000ms, like waiting for a resource.
@vaprog Because your warning doesn't contain IDs from the client or server sessions I guess it is caused by queries launched from the NST session self.
Can you make a trace with SQL Profiler and check if any odd query pops up every 30 sec? I did a quick trace on a local NST myself, only micro queries are executed from the idle NST. Nothing worth to mention and certainly nothing close to the 1000ms duration time.
Does your system have limited resources or is it overwhelmed with other tasks? In that case long running queries would occur easier.
Easiest solution is to higher the threshold to 2000ms for example. That way you will still be informed about long running queries without flooding the event viewer application log.0 -
I mentioned, that my entries occur regularly (i.e. 30 seconds after the last he next one begins).Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030
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