hangfire-postgres / Hangfire.PostgreSql

PostgreSql Storage Provider for Hangfire
Other
361 stars 132 forks source link

Loading 5000 Failed jobs when there's even more causes a Memory Leak #373

Open HarryCordewener opened 2 months ago

HarryCordewener commented 2 months ago

I'm working on integrating Hangfire, and found what looks like a memory leak. Memory goes to 1.3GB when loading 5000 failed tasks in the UI, and pins there.

It looks like there are about 21700+ BufferSegments remaining, for a total of about 90,000,000 bytes (~700MB). I've attached a sql file that can help reproduce this.

I have not yet tried this with other databases, so I am not 100% the fault lies with this plugin, but I'd love to get your eyes on this.

dump-taskworkflowprocessor_nonprod-202408021359.zip

HarryCordewener commented 2 months ago

image image

HarryCordewener commented 2 months ago

This may be related to issue #325