We have an ASP.NET Web Application and we try to understand the behaviour of Hangfire on long running jobs. We configured our app to host Hangfire on our web app process.
We use PostgreSQL 10 for both web and hangfire backend and we use EF 6 for db access.
We override SaveChanges on our dbcontext class to process entities async. (these async process may involve db operations too.) And we call Enqueue method in overriden Method before base.SaveChanges for the mentioned async process.
For individual updates or deletes, there seems to be no delays or waits.
But for a simple loop for 100 records, It takes way more than expected and the jobs (i know it sounds weird) seems to block/slow down the loop.
Do you have any debugging suggestions to find the responsible piece? Anyone have similar setup and ideas?
Thanks in advance.