I've got a situation with about 30,000 messages stuck in a queue that need processing by my Azure function app. The app works fine for around 5 minutes before freezing, and the only way to get it operational again is by manually restarting it every few minutes, which is really inconvenient. An ex-colleague of mine created a logic app designed to automatically restart the function app, but I'm having trouble getting it to work properly. The logic app designer shows an error: "Unable to initialize operation details for swagger based operation - Restart_web_app. Error details - Incomplete information for operation 'Restart_web_app.'"
I don't have extensive knowledge about these setups, but I've compared the code that my colleague wrote with what Copilot generated for me, and they seem quite similar. I just want to know what I'm doing wrong—I'm really tired of the manual restarts! By the way, it's also frustrating that I can only download 32 items at a time from the queue and have to clear them before retrieving more, but that's a separate issue.
1 Answer
Instead of relying on the logic app, consider fixing the function app. It might be crashing or getting locked up. One possible solution could be to set up a service bus queue for your IoT messages and scale out the function app to better handle the traffic. Understanding your host configuration and monitoring metrics could give you valuable insights into the issue. Just restarting it every few minutes is a temporary fix and might not solve the underlying problems you’re facing!

I get that fixing the entire setup isn't feasible right now. But for now, focus on using the logic app to handle restarts temporally while you work out the scaling and configuration! Good luck!