Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangfire job freezes after a few seconds of run in linux container #383

Open
jamespaulb opened this issue Dec 20, 2024 · 5 comments
Open

Comments

@jamespaulb
Copy link

jamespaulb commented Dec 20, 2024

We are using Hangfire.AspNetCore Version 1.8.14 and the hangfire.PostgreSql version 1.20.8 with .NET Core 8.0 in a linux container where we have multiple instances of application running.

The job starts and freezes after a few seconds. There are no exception or error messages shown.

@azygis
Copy link
Collaborator

azygis commented Dec 20, 2024

We'll need more details and preferably a reproduction for this. We've been using Hangfire in linux container for years and plenty of versions, both .NET and Hangfire. Sounds more like the job logic itself hangs somewhere.

@jamespaulb
Copy link
Author

jamespaulb commented Dec 20, 2024

If i use one instance of the application, then the job runs without issues. If i increase the number of instances of applications to 2 or more, then each instance processes a separate job. We need multiple instances as we need to process the different requests parallelly. Does this lead to any deadlock or concurrency issue?

@azygis
Copy link
Collaborator

azygis commented Dec 20, 2024

Again, we need more details. What are the jobs doing? How is Hangfire set up?

We use 1-4 instances depending on environment. Never had a job just stuck, other than a bug in the job itself which ended up waiting indefinitely for a condition that never went true.

@jamespaulb
Copy link
Author

jamespaulb commented Jan 6, 2025

Thank you azygis. The job reads a csv file consisting of millions of rows and updates the data of one or more columns in it. Are there any recommended versions of Hangfire.AspNetCore and hangfire.PostgreSql for .NET Core 8.0?

@azygis
Copy link
Collaborator

azygis commented Jan 6, 2025

There is no particular recommended version. Any version works.

"Millions of rows" may incur OOM exception which nay or may not be logged, depending on whether the container stays alive for long enough, and also depending on whether it's all in memory or not. With such a vague job description I'm afraid I cannot help, still. This may as well be just infrastructure issue not related the the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants