This release contains important fixes for the Hangfire.SqlServer package, which is actively using the sp_getapplock stored procedure to synchronize work between different servers. I’ve realized that locks shouldn’t be awaited on SQL Server’s side, because this may lead to SQL Server’s connection pool starvation, because each blocked request will block a single worker thread.

When you are using a lot of workers, and there’s a contention on few lock resources (like when using the DisableConcurrentExecutionAttribute, batches or many continuations on a single job), all worker threads can be blocked in SQL Server, causing its unresponsiveness and lead to huge amount of timeout exceptions.

Hangfire.SqlServer

  • Fixed – Timeout exceptions that’s caused by SQL Server’s thread pool starvation, caused by sp_getapplock.
  • Fixed – Antecedent background job is constantly failing, when its continuation hasn’t been fully created.

Comments