I have a job which performs following steps on high level
- Load Stage table
- Load Fact table
- Apply lots of rules on fact table, so lots of updates
This was working fine for more than a year but now it gets stuck after applying some of the rules. Every time gets stuck at a different rule in step 3
SP_WHOISACTIVE suggests that some other session starts blocking the update of data and my job is waiting for lock
When I looked up the blocking session, its a sleeping session initiated by SA on master. It seems like for some reason SQL decides to block this execution after some time.
I tried to kill this blocking session but receive error "Process ID X is not an active Process ID"
My sql server is hosted in Azure using elastic pool and i have already tried to increase the db storage and cores by 25% but no luck.
Same job also loads other fact tables from different regions and those are all still working fine. The only difference data for other regions is around half. But this job was also working fine for this region for more than a year with similar data.
EDIT
Output from sys.dm_exec_requests