Problem
In the background task, the service keeps trying to run when there’s an error, but it keeps retrying forever. This can slow down the system and cause issues.
Solution
We can fix this by setting a timeout for the background tasks. This means if the task fails after a certain number of tries or a set time, it will stop trying. This will help keep the system running smoothly and make it easier to handle errors.