Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring API not pulling any data #117

Open
DSCmattb opened this issue Dec 30, 2021 · 1 comment
Open

Monitoring API not pulling any data #117

DSCmattb opened this issue Dec 30, 2021 · 1 comment

Comments

@DSCmattb
Copy link

I'm running SQL 2016 as the storage and can see in the Set table console logs for example Key "console:61a3d4c0e711404025"

I can also confirm in the Hash table these are correct, however when running the code with the correct JobId as mentioned in your previous issues the following sql is run.

exec sp_executesql N' select * from [HangFire].Job with (nolock, forceseek) where Id = @id select * from [HangFire].JobParameter with (nolock, forceseek) where JobId = @id select * from [HangFire].State with (nolock, forceseek) where JobId = @id order by Id desc',N'@id nvarchar(4000)',@id=N'1404026'

This renders the correct data for the job and I can confirm this is the only job in the database (test environment)

The next is the request to find the Set information which renders an incorrect console:

exec sp_executesql N'select count(*) from [HangFire].[Set] with (readcommittedlock, forceseek) where [Key] = @key',N'@key nvarchar(4000)',@key=N'console:df6915c0e711404026'

The Hangfire Job Server is running in a standalone application and process, processing the job queues. The application pulling the data for display is a separate process also. I can confirm all of the other data is pulled correctly from the monitoring api. Both application have UseConsole set.

@DSCmattb
Copy link
Author

I've done a bit more research today, it seems that the timestamp provided to ConsoleId is different to the one persisted in SQL. Only marginally different but, enough to cause the timestamps to calculate a different ConsoleId. For example, the breakpoint when the code runs provides 2021-12-31 07:25:58.502137, in SQL 2021-12-31 07:25:58.593. I would assume the 91ms would cause that kind of issue, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant