Comments (5)
Which redis storage provider are you using? Is it Hangfire.Pro.Redis, or Hangfire.Redis.StackExchange, or a legacy Hangfire.Redis?
from hangfire.console.
StackExchange
from hangfire.console.
Sorry, cannot reproduce it within a template .net core app with Hangfire 1.6.14, Hangfire.Redis.StackExchange 1.7.0 and Hangfire.Console 1.3.3.
Startup.cs:
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(config =>
{
config.UseRedisStorage("127.0.0.1:6379,defaultDatabase=2,allowAdmin=true,syncTimeout=15000");
config.UseConsole();
});
}
public static async Task Execute(PerformContext ctx, IJobCancellationToken cancellationToken)
{
var things = new[] { 1, 2, 3, 4, 5 };
foreach (var thing in things)
{
cancellationToken.ThrowIfCancellationRequested();
Thread.Sleep(TimeSpan.FromSeconds(1));
ctx.WriteLine($"Do something with the thing: {thing}");
}
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHangfireDashboard();
app.UseHangfireServer();
app.Run(async (context) =>
{
BackgroundJob.Enqueue(() => Execute(null, null));
await context.Response.WriteAsync("Hello World!");
});
}
}
Can you provide some more details on your environment?
from hangfire.console.
Ok fair enough, I'll setup a testable example and send you the repo details.
Might take me a couple of days to get it done.
Thanks very much for your efforts thus far.
from hangfire.console.
I setup a local environment and like yourself was unable to replicate the issue. In production we are running on AWS with an RDS instance of Redis.
After playing with some of the Redis timeout settings (https://stackexchange.github.io/StackExchange.Redis/Configuration) I managed to get it to work as expected.
Increasing the "SyncTimeout" value from 1 second to 10 seconds has solved the issue for me.
10 seconds is probably a little excessive and with more testing and tweaking, I imagine I'll be able to drop that value back down significantly.
from hangfire.console.
Related Issues (20)
- String format like MEL HOT 1
- FollowJobRetentionPolicy not working with Hangfire.Pro.Redis
- Custom text for progressbad HOT 3
- Write line into job detail HOT 2
- Database Size on SQL Server too big
- Monitoring API not pulling any data HOT 1
- Constantly polling the same rows on Linux machines HOT 11
- Output layout is broken HOT 3
- "Console is already initialized" Exception in unit tests HOT 2
- Hangfire.Console has a dependency to versions of Hangfire.Core with known vulnerabilities HOT 2
- Console section not showing when setting custom hangfire dashboard path
- Does anyone suffers from server restarts when larger amount of logs is pushed into Console? HOT 5
- Progress endpoint won't respect PrefixPath defined in dashboard UI HOT 8
- Occasional exception in production when progressbar is disposed: Invalid operation. The connection is closed. HOT 1
- Is this package deprecated, should we switch to IdentityServer.Hangfire.Console or another fork? HOT 3
- Hangfire.Console was not properly configured HOT 5
- Console does not refresh HOT 1
- Nuget private API key is committed in appveyor.yml HOT 2
- Console does not update if job was requeued
- IdentityStream.Hangfire.Console - merge back into Hangfire.Console?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hangfire.console.