4
votes

I have a custom built docker image which purpose is to process files that are loaded into a storage account or service bus. The container has no exposed ports.

I can deploy this image and start the container on the Azure Web App but after 240 seconds the container seems to terminate. The logs indicate that the container did not start within the time limit.

Am I correct in assuming that if no ports are exposed in my container that the webapp thinks that the container was not started correctly?

What is the best alternative for deploying my container if this is the case? (ACI, ACS, AKS,.. ?)

1

1 Answers

0
votes

Azure Load Balancer has a default idle timeout setting of four minutes. This is generally a reasonable response time limit for a web request. If your webapp requires background processing, it is recommended to use Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers, see https://docs.microsoft.com/en-us/azure/app-service/web-sites-create-web-jobs

Checkout the FAQs here: https://docs.microsoft.com/en-gb/azure/app-service/containers/app-service-linux-faq

Can I expose more than one port on my custom container image? We do not currently support exposing more than one port.

My custom container listens to a port other than port 80. How can I configure my app to route requests to that port? We have automatic port detection. You can also specify an app setting called WEBSITES_PORT and give it the value of the expected port number. Previously, the platform used the PORT app setting. We are planning to deprecate this app setting and to use WEBSITES_PORT exclusively.