HangfireIO / HangfireIO/Hangfire

Millions/Billions of HangFire queries being highlight in SSMS Activity Monitor

Open
#2,120 19 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Hi, I'm trying to get to the bottom of some performance issues on our production environment and SSMS is highlighting the following query in the activity monitor under expensive queries:
```

```

![image](https://user-images.githubusercontent.com/22151993/200832040-44d48f79-0c84-4b17-83fd-b8a145fa55f1.png)

We are using the following settings, which are implied by [similar](https://github.com/HangfireIO/Hangfire/issues/1962) [issues](https://github.com/HangfireIO/Hangfire/issues/1664) already:

```
GlobalConfiguration.Configuration.UseSqlServerStorage(Globals.ConnectionString, new SqlServerStorageOptions
{
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero
});
```

The query count seems to deviate between about 23,000 and >1.2 billion (as per the above screenshot). Why is this and have I misconfigured something? Here's a screenshot of all our recurring jobs (we only use HangFire for these recurring jobs):

![image](https://user-images.githubusercontent.com/22151993/200833156-a31c6e59-76a3-43b5-8040-14cee1ef1b95.png)

Contributor guide

Open the contributing guide

Research direction

Start with the reported JobQueue UPDATE query and the SqlServerStorageOptions settings, then compare the behavior with similar issues 1962 and 1664. Investigate why SSMS reports query counts ranging from 23,000 to over 1.2 billion for recurring jobs. Done means explaining whether the count is expected or identifying a configuration or implementation problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.