imranmomin/Hangfire.AzureDocumentDB

Problem with the increase of workers with thousands of pending jobs

Closed this issue · 1 comments

The problem is that, I have three server with five hundred each one. We are proof of load with 10k jobs but the number he number of jobs that are being processed in the dashboard does not exceed two hundred. @imranmomin, Can you help me

We have de next configuration...

Hangfire.Azure.DocumentDbStorageOptions options = new Hangfire.Azure.DocumentDbStorageOptions
{
RequestTimeout = TimeSpan.FromSeconds(30),
ExpirationCheckInterval = TimeSpan.FromMinutes(2),
CountersAggregateInterval = TimeSpan.FromMinutes(2),
QueuePollInterval = TimeSpan.FromSeconds(15),
ConnectionMode = ConnectionMode.Direct,
ConnectionProtocol = Protocol.Tcp,
EnablePartition = true // default: false true; to enable partition on /type
};
GlobalConfiguration.Configuration.UseAzureDocumentDbStorage(
ConfigurationManager.AppSettings["CommanderHF:AzureDocumentDbUrl"],
ConfigurationManager.AppSettings["CommanderHF:AzureDocumentDbAuthSecret"],
ConfigurationManager.AppSettings["CommanderHF:AzureDocumentDbDatabaseName"],
ConfigurationManager.AppSettings["CommanderHF:AzureDocumentDbCollectionName"]
, options);

var backgroundJobServerOptions = new BackgroundJobServerOptions()
{
Queues = "default",
WorkerCount = 500
};

This repo just provides the storage options. The actual processing is done using Hangfire.Core. Are you able to reproduce the same using the SQL server storage