Hangfire: Provide a ceiling value for `WorkerCount` setting

Created on 14 Nov 2014  ·  4Comments  ·  Source: HangfireIO/Hangfire

Every worker owns a connection to a storage. Currently WorkerCount value in BackgroundJobServerOptions is being calculated as a ProcessorCount * 5 value. In usual cases this value is ok as a default, but consider you have a 20-core server. In this case there will be 100 workers, and it is fine. However, since each worker use a connection, this value can produce errors:

To make things more predictable, the default value should have a maximum at, for example, 40 to produce enough workers and leave some connections for other components.

All 4 comments

Hi @odinserj, seems like BackgroundJobServerOptions still allows only a maximum of 20 workers. Is it still required to be max 20, or can it be increased/overridden somehow?

Hi @odinserj, seems like BackgroundJobServerOptions still allows only a maximum of 20 workers. Is it still required to be max 20, or can it be increased/overridden somehow?

Hi, thoughts on this? Is it still maxed to 20?

It's a limit only for the default value. You can set as many workers as you want.

Thank you very much, love the product btw...built some really cool stuff with it :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cindro picture cindro  ·  3Comments

tompazourek picture tompazourek  ·  3Comments

cbmek picture cbmek  ·  3Comments

thurfir picture thurfir  ·  4Comments

dealproc picture dealproc  ·  3Comments