I've seen in multiple Azure function apps that the host is stopping on a regular basis and automatically restarting. Since a week on of my Azure function apps is stopping, but I need to manually restart the host.
In ApplicationInsights a ran the following query:
traces
| where message == "Job host stopped" or message == "Job host started"
| order by timestamp asc
- 23-1-2022 20:08:42.436 Job host started
- 23-1-2022 20:09:25.668 Job host stopped
- 23-1-2022 21:08:48.800 Job host started
- 23-1-2022 21:11:33.702 Job host stopped
- 23-1-2022 22:17:03.286 Job host stopped
- 23-1-2022 22:18:39.002 Job host started
- 23-1-2022 23:10:31.580 Job host stopped
- 24-1-2022 06:41:48.024 Job host started
- 24-1-2022 06:42:44.680 Job host stopped
- 24-1-2022 06:43:00.902 Job host started
- 24-1-2022 07:10:52.220 Job host stopped
The start on 24-1-2022 06:41 is due to a manual restart of my function app. No timetrigger has executed durring this stop period. This is happening more than once a day. Without a pattern.
Any ideas? eventlog isn't usefull, between the auto-stop and manual restart is nog logging in insights.
How can I trouble shoot this? Why is the function restarting so often?
Update: a manual trigger (http) is restarting the host.