I'm trying to set up Hangfire (version 1.7.3) on a C# API with Postgres, but I need to limit the number of connections Hangfire uses in Postgres.
app.UseHangfireServer(config => {
config.UseServer(2); //that option does't exist for postgres
});
Found proper solution:
var options = new BackgroundJobServerOptions { WorkerCount = 2 };
app.UseHangfireServer(options);
Connections dropped to 6 from 20+ (crash on heroku).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.