Hangfire.Console icon indicating copy to clipboard operation
Hangfire.Console copied to clipboard

Constantly polling the same rows on Linux machines

Open lukasan opened this issue 3 years ago • 11 comments

Hello, I'm having the same problem as #99 had. It starts repeating everything every polling interval after the function ends. Debug mode on Manjaro is like that. Production Ubuntu does the repeat polling also. But Windows debugging is working normally... So I figured this is a problem of the environment.

I tried with in-memory storage on Manjaro and there was no difference. So database provider is not likely to be the problem.

I'm using MariaDB. Same behaviour between .NET 5.0 and .NET 6.0.

lukasan avatar Feb 18 '22 13:02 lukasan

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

khellang avatar Oct 20 '23 12:10 khellang

Hey @khellang. On a Ubuntu 20.04 64bit-based VPS:

$ locale -a
C
C.UTF-8
$ locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
$ localectl status
   System Locale: n/a
       VC Keymap: n/a
      X11 Layout: us
       X11 Model: pc105

Seems like this is not the problem.

lukasan avatar Oct 24 '23 15:10 lukasan

We are seeing the same problem. This time on Windows. The Console keeps updating even though the job is already done and the entire log has been loaded.

The problem seems to be the parsing of the attribute "data-n", that has an invalid character. This minus sign (-) has a charcode of 8722, but should be 45.

Same problem as in #99 and (with a twist), #111

image image

leoerlandsson avatar Oct 30 '23 11:10 leoerlandsson

Ah, yeah, that's the same. We're working on a fork with a bunch of bugfixes, including this one (here). Hopefully we'll be able to push a version to NuGet this week.

khellang avatar Oct 30 '23 11:10 khellang

I'm assuming you're using Swedish locale, which is infamous for having a different NegativeSign than most other cultures. Forcing InvariantCulture (as in my commit) should fix the issue.

khellang avatar Oct 30 '23 11:10 khellang

I'm assuming you're using Swedish locale, which is infamous for having a different NegativeSign than most other cultures. Forcing InvariantCulture (as in my commit) should fix the issue.

We are using Swedish locale. Not reproducible with English Culture.

Good catch, and thanks.

(Then there's the issue of getting the PR into Hangfire.Console. I guess @pieceofsummer is in the war? :( )

leoerlandsson avatar Oct 30 '23 11:10 leoerlandsson

Then there's the issue of getting the PR into Hangfire.Console.

In the meantime, 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 😄

khellang avatar Nov 02 '23 21:11 khellang

Thanks Kristian!

leoerlandsson avatar Nov 02 '23 21:11 leoerlandsson

the locale problem is not related with my original issue.

lukasan avatar Nov 02 '23 21:11 lukasan

@lukasan Wanna give the forked package a shot and see if it changes anything? Maybe you could check the data-n attribute in your browser?

khellang avatar Nov 02 '23 21:11 khellang

Then there's the issue of getting the PR into Hangfire.Console.

In the meantime, 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 😄

Thanks! Constant polling is now fixed :1st_place_medal:

peters avatar Nov 03 '23 06:11 peters