Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Latencies in production environment

(0) ShareShare
ReportReport
Posted on by 10
Hello, 
 
We are facing blocking latencies in the production environment, it happens periodically every 15minutes or so. when I run the live query in the health metrics on LCS I have the following message :
 
as
(
select spid, '' as parentspid, program_name as spidprogramname,hostname from sys.sysprocesses (NOLOCK) a where blocked = 0 and dbid = DB_ID()
and spid in ( select blocked from sys.sysprocesses a where blocked 0) and dbid = DB_ID()
and program_name not like '%DAMS%'
union
select spid, blocked as parentspid, program_name as spidprogramname, hostname from sys.sysprocesses (NOLOCK) where blocked 0
and dbid = DB_ID()
and program_name not like '%DAMS%'
),
blocksinfo2
as
(select *, cast(spid as nvarchar(30)) AS hierarchy from blocksinfo1 where parentspid = 0
union all
select m.*, cast((hierarchy+'.'+cast(m.spid as nvarchar(30))) as NVARCHAR(30)) AS hierarchy
from blocksinfo1 m join blocksinfo2 on m.parentspid = blocksinfo2.spid)
SELECT r.*,
ISNULL(BLOCKED.wait_time, 0) AS wait_time,
CASE
WHEN BLOCKED.wait_resource like 'objectk%' THEN 'Object'
WHEN BLOCKED.wait_resource like 'page%' THEN 'Page'
WHEN BLOCKED.wait_resource like 'key%' THEN 'Key'
WHEN BLOCKED.wait_resource like 'rid%' THEN 'Row'
ELSE 'N/A'
END AS wait_resource,
BLOCKEDSQL.text AS SQLText,
ISNULL((BLOCKED.total_elapsed_time), 0) AS DurationInMilliSeconds into #WhatsRunning
FROM blocksinfo2 r
left outer join sys.dm_exec_requests blocked on blocked.session_id = r.spid
OUTER APPLY sys.dm_exec_sql_text(BLOCKED.sql_handle) AS BLOCKEDSQL
WHERE blocked.database_id = db_id()
Order by hierarchy/>with blocksinfo1 as ( select spid, '' as parentspid, program_name as spidprogramname,hostname from sys.sysprocesses (NOLOCK) a where blocked = 0 and dbid = DB_ID() and spid in ( select blocked from sys.sysprocesses a where blocked <> 0) and dbid = DB_ID() and program_name not like '%DAMS%' union select spid, blocked as parentspid, program_name as spidprogramname, hostname from sys.sysprocesses (NOLOCK) where blocked <> 0 and dbid = DB_ID() and program_name not like '%DAMS%' ), blocksinfo2 as (select *, cast(spid as nvarchar(30)) AS hierarchy from blocksinfo1 where parentspid = 0 union all select m.*, cast((hierarchy+'.'+cast(m.spid as nvarchar(30))) as NVARCHAR(30)) AS hierarchy from blocksinfo1 m join blocksinfo2 on m.parentspid = blocksinfo2.spid) SELECT r.*, ISNULL(BLOCKED.wait_time, 0) AS wait_time, CASE WHEN BLOCKED.wait_resource like 'objectk%' THEN 'Object' WHEN BLOCKED.wait_resource like 'page%' THEN 'Page' WHEN BLOCKED.wait_resource like 'key%' THEN 'Key' WHEN BLOCKED.wait_resource like 'rid%' THEN 'Row' ELSE 'N/A' END AS wait_resource, BLOCKEDSQL.text AS SQLText, ISNULL((BLOCKED.total_elapsed_time), 0) AS DurationInMilliSeconds into #WhatsRunning FROM blocksinfo2 r left outer join sys.dm_exec_requests blocked on blocked.session_id = r.spid OUTER APPLY sys.dm_exec_sql_text(BLOCKED.sql_handle) AS BLOCKEDSQL WHERE blocked.database_id = db_id() Order by hierarchy

Did anyone face any similar issue and has any idea what causes this ? This is blocking and waiting for MS reply
 
Thank you
 
 
  • IE-11071325-0 Profile Picture
    IE-11071325-0 10 on at
    Latencies in production environment
    Hello, 
     
    It's on Finance and Operations. 
    Thank you 
  • Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Latencies in production environment
    Hi Partner,
    Could you tell me what app you are using in Dynamics 365? Finance & Operation?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans