HangfireIO / HangfireIO/Hangfire

More and more memory after every request

Open
#2,335 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Hello,
When I remove hangfire its better but not ok.
Can you pls show me what I did wrong in my code (globally) or about using hangfire?
Here is my minimal project for reproducing this issue.
Link to repo: [https://github.com/Merynek/Memory-leak](url)

About using hangfire:
Crete job:
`jobEntity.HangFireJobId = BackgroundJob.Schedule(item.DoWork, item.ScheduledFor);`¨
Delete job:
`BackgroundJob.Delete(job.HangFireJobId);`

Mby I do someting wrong in DI or mby DB entities or something, but I dont know what is wrong.
I tried some memory-leak utils but with no significant results :-(.

I am beginner of context (.NET) I am senior frontend developer so pls be nice :-)

Thank you very much :-)

Contributor guide

Open the contributing guide

Research direction

Start by running the minimal reproduction project linked in the issue and compare memory growth with Hangfire removed. Review the scheduled job creation and deletion calls, then inspect the DI setup and database entities mentioned by the reporter; done means identifying whether the growth comes from Hangfire usage or the application code and documenting a reproducible cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.