Slow INSERT Queries on Azure SQL
# help-with-umbraco
b
We are experiencing an issue with our Umbraco app (version 12.3.10) hosted on Azure App and Azure SQL (Basic Tier, 5 DTO uses %5-%10 of DTU on idle) Recently, saving new content to the Umbraco database has started taking an unusually long time. We tested saving content both through the Backoffice panel and via the SaveAndPublish function in the backend, and in both cases, the saving process takes the same amount of time. However, when we transferred our database to a Windows server, the issue was resolved, and saving content became fast again. But when reconnecting our local project to the Azure database, the problem reappeared, with slow save times for any content. Additionally, we tested adding new records to the database table directly via SQL Server Management Studio, and it worked without any delays. What will be the problem in Azure SQL? Where can we start to analyze to solve this?
m
Start with a SQL Profile to see what queries takes a long time. Install the FirstResponderKit on the SQL to get a bit more statistics - not all stats are available on Azure SQL. https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit Start with for example the sp_BlitzCache to see what excecution plans that could be the problem. Maybe an index is missing. Maybe run the sp_BlitzWho when the slow action is running.
d
A SQL database with only 5 DTUs is going to be very slow. At nearly everything. When you publish a node, not only does the UmbracoNode table get updated, but any UmbracoProprtyData items for fields on the item, plus the history tables record the publish, Notifications are fired to update Examine (which in turn cause select queries to execute to index the item that was published), and the database cache table is updated. That will easily consume all the available DTUs, which will cause Azure to throttle your instance, and Umbraco to go into its retry scenarios.
d
@DortL7L7L7 is correct. The documentation actually recommend a S2 tier. Also make sure you have the recommended configuration : https://docs.umbraco.com/umbraco-cms/v/12.latest/fundamentals/setup/server-setup/azure-web-apps
8 Views