Sorry, I can't provide you a reproducible example but I hope you can help me to figure out what's going wrong in my environment.
I run a windows container based .NET 4.7 application inside a PC3 App Service Plan (16GB RAM). The application exposes a REST API and is also a JobHost that gets triggered on certain BlobStorage Events.
The whole business logic works fine - it runs without any issues locally and it does also run a limit time (1 - 5 min) on Azure. However, somehow the container gets restarted every x minutes and I am not able to figure out why.
This is what I see in the container logs:
02/10/2019 12:23:46.142 INFO - Site: myapp - Container failed availability check. It has failed 122895 check(s). Container will be declared unavailable if it exceeds 3 consecutive failed checks.
02/10/2019 12:23:46.142 ERROR - Site: myapp - Container is unavailable.
02/10/2019 12:23:47.129 INFO - Site: myapp - Container failed availability check. It has failed 5 check(s). Container will be declared unavailable if it exceeds 3 consecutive failed checks.
02/10/2019 12:23:47.129 ERROR - Site: myapp - Container is unavailable.
....
02/10/2019 12:23:56.862 INFO - Site: myapp - Attempting to stop container: 310a7f2278cdb56...
02/10/2019 12:23:56.895 INFO - Site: myapp - Purging pending logs after stopping container
02/10/2019 12:23:56.895 INFO - Site: myapp - Container stopped successfully. Container Id: 310a7f2278cdb56....
I have no idea why the availability check fails. Can someone explain to me how the check works and how I can get further information on why it fails?