We have a project that makes use of 3rd party PDF / image processing DLLs. These tools sometimes behave badly (especially when running in IIS), they hang, get in infinite loops, crash hard-core (take down IIS). We mitigate this somewhat now with a custom “task and thread in a new appdomain” model with timeouts, but its not ideal. Sometimes these assemblies use non-managed code or do odd things with IE / Gecko and can crash the parent process.
My question is, how does Hangfire handle this? Can we say - “don’t let this job run more than 30 seconds”? And what happens if things got REALLY wrong in a job process?