Application on Azure App Service plan is so slow?

By default, when you deploy an application to Azure App Service plan – your default web location will be under /home/site/wwwroot . /home/ is a persistent storage which means if you restart your application, your data will be still there.

The problem with /home folder is that, it’s actually a network folder , which means every time you want to access files on this folder, it will do a network call. Some applications using some framework like Symfony , their library is huge, they read a lot of files , this will cause your application is very slow to respond.

How do we fix this? If you are in a situation like using Symfony , you need to move your root folder to / folder . But since this folder will be lost when you restart the docker, you need to have a start up script to copy your web folder to this new root folder, any things that are changed by the application such as log / files upload must be in /home folder. You can achieve this by using “ln -s /source/folder /home/folder”.

Leave a Reply

Your email address will not be published. Required fields are marked *