(wrong?) Temp folder on Linux / docker performance poorly on Net Core (Umbraco) in Azure Web Apps

Ambert van Unen 1 Reputation point
2022-04-08T08:53:40.46+00:00

Hi readers,

The latest Umbraco CMS is fully .net core compatible. Locally I have it running in a Docker (Linux container) smooth as butter!

I've tested locally using a Linux container in Docker and the performance was normal.
When deploying the site on Azure Web App in Windows the performance is normal
When deploying the site on Azure Web App in Linux the issue appears.
When deploying the site on Azure Web App in a Linux Docker container, the issue appears.

I've debugged this to the point it has something to do with the performance of the temp folder.

The Umbraco cache gets by default placed in the "/app/umbraco/Data/TEMP" folder. Only when building this cache the performance (for some reason) is horrendous on Linux Azure Apps (or Docker Azure apps), so when booting the website, the cache gets rebuild and it can take many minutes to finally be build.

There is a setting in Umbraco for Azure Windows Web Apps that is supposedly increasing the performance on Windows Azure Apps, this setting changes the cache folder to a value used using a Core function : Path.GetTempPath() and this returns (for a Linux / docker environment) "/tmp/Umbracodata/{applicationid}".
Now sadly, for Linux for Linux / Docker this does not seem to have any effect.

Hoever, LOCALLY (in a Linux/docker), when the setting is off, all is smooth, but when enabling this setting, i'm having the same issues as online!.

This leads to me thinking it has something to do with this cache. I'm hoping anyone else has some experience on this, or what the cache folder should be, or what is best for performance.
What I don't understand though, why it locally (without the setting) performance well, as a docker should run the same everywhere right ? :-)

Side note: I've tried increasing the performance on Azure web app + database, but this has limited effects on this issue

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,553 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,757 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,346 Reputation points Microsoft Employee
    2022-04-11T01:27:07.387+00:00

    Hi @Ambert van Unen Thank you for your question regarding Umbraco on Azure Web Apps.

    Azure App Services uses a remote storage for site files. Your site files are not sitting directly on the worker themself. This can cause issues if you have a high IO operation, which is sounds like building the cache in your instance must be.

    Secondly, can you please try to create something like a appSettings.json and place the below configurations?

    {  
        "Umbraco": {  
            "CMS": {  
                "Global": {  
                    "MainDomLock" : "SqlMainDomLock"  
                },  
                "Hosting": {  
                    "LocalTempStorageLocation": "EnvironmentTemp"  
                },  
                "Examine": {  
                    "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory"  
                }  
            }  
        }  
    }  
    

    Lastly, can you ensure that your Azure SQL tier is S2 or higher? This is the minimum recommended tier as suggested by Umbraco themselves.

    Please let us know the outcome. We look forward to your repl.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.