You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have found that the use of cancellation tokens (using Hangfire v.1.6.22+) can generate a lot of database load and can significantly reduce performance of long running tasks if called too frequently. More clarity in the documentation regarding "Using cancellation tokens" that it triggers code blocking database calls should be mentioned to help other Hangfire users improve their task performance when faced with this issue.
The text was updated successfully, but these errors were encountered:
CliffSenkbeil-AI
changed the title
Use of Cancellation Methods for long running processes can cauase performance issues
Use of Cancellation Methods for long running processes can cause performance issues
Oct 31, 2019
CliffSenkbeil-AI
changed the title
Use of Cancellation Methods for long running processes can cause performance issues
Extensive use of Cancellation Methods for long running processes can cause performance issues
Oct 31, 2019
CliffSenkbeil-AI
changed the title
Extensive use of Cancellation Methods for long running processes can cause performance issues
Extensive use of Cancellation Token checks for long running processes can cause performance issues
Oct 31, 2019
Starting from Hangfire 1.7.0 it's possible to use regular CancellationToken parameters in your jobs. They are updated asynchronously, and no calls to ThrowIfCancellationRequested will lead to any network call. CancellationCheckInterval option controls how often cancellation tokens will be checked against the current job state.
I've just scheduled a work item to update the documentation, thank you for the hint.
We have found that the use of cancellation tokens (using Hangfire v.1.6.22+) can generate a lot of database load and can significantly reduce performance of long running tasks if called too frequently. More clarity in the documentation regarding "Using cancellation tokens" that it triggers code blocking database calls should be mentioned to help other Hangfire users improve their task performance when faced with this issue.
The text was updated successfully, but these errors were encountered: