step-up-labs / firebase-database-dotnet

C# library for Firebase Realtime Database.
MIT License
671 stars 170 forks source link

Validating end of stream to reconnect, and not up 100% CPU usage #254

Closed guiltm closed 3 years ago

guiltm commented 3 years ago

In a company project, it has this library, and every day we had to restart the service because the CPU reached 100%. How in that issue: https://github.com/step-up-labs/firebase-database-dotnet/issues/94

When analyzing the process, analyzing the "ReceiveThread" method, from the "FirebaseSubscription" class, was in an IO loop. When debugging the project for 1 day, I realized that the stream was coming to an end, and was in the loop. I added the validation to be thrown an exception, and it will be reconnected to the stream in the next loop. After that, it is 3 months with no CPU problems.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing the issue due to inactivity. Feel free to re-open