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

Constantly polling for the same output rows #99

Open
haxzorer opened this issue Aug 13, 2020 · 11 comments
Open

Constantly polling for the same output rows #99

haxzorer opened this issue Aug 13, 2020 · 11 comments

Comments

@haxzorer
Copy link

haxzorer commented Aug 13, 2020

I am trying to get this integrated into a project I'm working on, but are experiencing a weird issue.

When viewing the job page, the console part of the page keeps polling for "new" rows, even thought there are no new rows, and just keeps getting the same (in this case) 2 rows back, going on for what seems to be an inlimited number of time (I haven't sat around long enough to se if it stops).

I'm trying to figure out what I could have done wrong? The output, as far as I have tested, works as expected otherwise.

A short recording showing the issue. The output should just be this

 +5.122s  Hello, world 1
+10.132s  Hello, world 2

ezgif-7-7a4911e7265f

@pieceofsummer
Copy link
Owner

As I see it, the extension cannot tell if the job is still in the Processing state.

What storage provider are you using? Most of weird problems are usually related to the 3rd party implementations not strictly following the rules set by the official ones.

Also check the JS console if there's any errors.

@haxzorer
Copy link
Author

@pieceofsummer Yes, Redis is used as a storage provider, through the Hangfire.Redis.StackExchange I think. Not 110% sure about all the details, since I was not the one in my team that set this up, but the code uses this bit to configure Hangfire:

services.AddHangfire(configuration => configuration
             .SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
             .UseSimpleAssemblyNameTypeSerializer()
             .UseRecommendedSerializerSettings()
             .UseSerilogLogProvider()
             .UseConsole()
             .UseRedisStorage(Redis,
                 new Hangfire.Redis.RedisStorageOptions
                 {
                     Prefix = Configuration["Environment"]
                 }
             ));

And these are the packages related to Hangfire:

    <PackageReference Include="Hangfire.AspNetCore" Version="1.7.11" />
    <PackageReference Include="Hangfire.Console" Version="1.4.2" />
    <PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.4" />

I checked the JS console, but the only thing there is this:

polling was started

@pieceofsummer
Copy link
Owner

That's interesting. I'm using Redis provider with Console on my server with no issues. Can you provide a minimal project to reproduce your issue?

@haxzorer
Copy link
Author

@pieceofsummer Sorry for the late reply, I'm working on getting a minimal project to you!

@haxzorer
Copy link
Author

@pieceofsummer I have added a minimal project in a public repo: https://github.com/haxzorer/HangfireConsoleTest

When I run this, like it is described in the readme, I get the same issue that I have reported here. I would be very grateful if you could look at it, and see if there is something that I have overlooked, or just plain gotten wrong, when setting everything up!

@pieceofsummer
Copy link
Owner

Sorry for the delay, finally got some time to take a look.

Unfortunately, I wasn't able to reproduce the issue:
Screenshot 2020-08-19 at 23 22 14

Try clearing your browser cache or trying different browser. Could be a caching issue, since Console injects own JS into Hangfire scripts.

@haxzorer
Copy link
Author

@pieceofsummer Hmm, strange, since I tried it in both Chrome and Safari, and Safari hade previously never visited the site.

Something to note though, is that we recently deployed the project we are using this package in to AWS, using Redis through AWS, and there it works as expected! Is there some kind of Redis configuration that could/should be done locally, that you know of?

@pieceofsummer
Copy link
Owner

Nothing special I know of, except for key eviction should be disabled so there's no data deleted because of keyspace being filled up.

@haxzorer
Copy link
Author

@pieceofsummer Okay, but thank you for testing it out! I'll see if I ever get it working locally. Regardless, it works beautifully in our production environment, so thank you for a nice package! 👍

@khellang
Copy link

Is this the same as #111? @haxzorer did you happen to run with an RTL locale on the server?

@khellang
Copy link

khellang commented Nov 2, 2023

There's now a forked version with some modernization and bugfixes now on NuGet.org. Hopefully this project will come back to life at some point and the fixes can be accepted upstream 😄

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

3 participants