I have a background task that makes a request to an api for data. I have this task running about every 2 min.
The task seems to run fine with no issue for days, but then out of the blue for no reason that I can see the task just stops running.
Logs show nothing, the only thing I see in the logs is “no log output” then that’s the last time the task runs. The prior task execution shows no errors either(200 response).
All the background task does is get data from an api then insert it into a Avnil db. The amount of data isn’t large, less than 200kb in most cases. With maybe 1-50 db rows being inserted at a time max.
The api I make request to isn’t rate limited at the request levels that I make, nor can I see any errors about the api requests failing or erroring out. I know the api can time out, (pretty rare but it does happen) but that doesn’t seem to correlate with the task ending. And when it does happen I see the timeout in the logs.
The only way I can seem to get the task running again is by either modifying the function in some way, then restarting or if I delete the task then re-add the task and restart.
Just restarting doesn’t seem to restart the task, seems I have to change something first before the task will start running again.
Some other key points to mention, I have another task running as a background task that pushes data to a different api. These tasks, best I can tell don’t conflict with one another, as they are set to different timeframes. Nor have I seen any errors that correlate with the timing of the first background task stopping.
Anyone else seen an issue like this? Is there a known bug that I may have missed that may be causing the issue?
Any help here would be greatly appreciated.