We have long-running WebAPI services, which use HangFire memory storage to dispatch background tasks for our game servers.
These tasks are dispatched for every transaction, and after 19-day of execution, we did a dump of the process. It showed that we accumulated 2.4GB in the Locks ConcurrentDictionary. In that time frame, we had 8 million transactions.
Seems that these Locks entries are not removed, and each entry is a BackgroundJob Id based, which is unique, so it will always keep the old entries, whilst accumulating new ones.
We have long-running WebAPI services, which use HangFire memory storage to dispatch background tasks for our game servers. These tasks are dispatched for every transaction, and after 19-day of execution, we did a dump of the process. It showed that we accumulated 2.4GB in the Locks ConcurrentDictionary. In that time frame, we had 8 million transactions.
Seems that these Locks entries are not removed, and each entry is a BackgroundJob Id based, which is unique, so it will always keep the old entries, whilst accumulating new ones.