# System.OutOfMemoryException during sending heartbeat

**URL:** <https://discuss.hangfire.io/t/system-outofmemoryexception-during-sending-heartbeat/10454>\
**Category:** bug?\
**Created:** [January 15, 2024, 7:50am UTC](https://discuss.hangfire.io/t/system-outofmemoryexception-during-sending-heartbeat/10454 "2024-01-15T07:50:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krzysztof\_Cichopek](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/krzysztof_cichopek/32/3587_2.png) [@Krzysztof\_Cichopek](https://discuss.hangfire.io/u/Krzysztof_Cichopek)\
**Post date:** [January 15, 2024, 7:50am UTC](https://discuss.hangfire.io/t/system-outofmemoryexception-during-sending-heartbeat/10454/1 "2024-01-15T07:50:50Z")

</div>

Hello Hangfire Team,

I am encountering a recurring issue with Hangfire in my production environment, which manifests approximately once every six months. The Hangfire server is running as a Windows Service, and my application is based on the .NET Framework 4.8. The issue involves exceptions that lead to a failure in Hangfire’s processes.

**Console Log Entries:**

1. **Warning Entry:**

2. **Error Entry:**

3. **Fatal Entry:**

These issues result in significant disruptions, necessitating a manual server restart. The infrequency of the problem makes diagnosis and prediction challenging.

I seek advice or guidance on the following:

1. Potential causes for these exceptions, especially in the context of a .NET Framework 4.8 application running as a Windows Service.
2. Best practices or configurations in a .NET Framework 4.8 environment that might help avoid these issues.
3. Any known issues or patches in Hangfire related to these exceptions under similar environments.

Any insights or recommendations to address or mitigate these issues would be greatly appreciated.

Thank you for your assistance.
