Hi,
We’re using Hangfire.Core and Hangfire.SqlServer versions 1.1.1 and the Servers page on the dashboard only lists a single Server. Still running about 100-120ish processes this morning.
Hi,
We’re using Hangfire.Core and Hangfire.SqlServer versions 1.1.1 and the Servers page on the dashboard only lists a single Server. Still running about 100-120ish processes this morning.
How many workers do you have? Because each worker maintain a connection to a storage, if you have 100 workers, they will have 100 connections, this is by design. If the number of worker is high, you may decrease the worker number. Have you seen the following issue (solved in Hangfire 1.2.0)?
My understanding of reading that is workers in the 1.1.1 version are defined by Processor numbers. All this testing is taking place right now on a quad core processor so if I’m following correctly (and I may not be), there should only be 20 workers.
Our theory may be that were opening but not closing connections, though I’m not sure how or where this could be being performed. Should we be cleaning up connections / processes manually?
Quick update, and thanks for all your help.
So I’ve installed v1.3, and specified a WorkerCount of 5. Processes are now down to about ~18 total.
5 workers take only 5 connections. Plus, eventually Hangfire acquires a connection to complete different maintenance jobs, so there also can be 2-3 inactive connections, reserved by connection pool. Hangfire wraps every connection creation with using
block, so it releases them. So Hangfire itself does not create or use excessive connections.