Slow response, and timeouts in the backoffice (onl...
# help-with-umbraco
m
Since I got a new laptop, the backoffice in Umbraco on localhost has really bad performance. The website on the frontend is super fast, however if there are images that are fetched from an api (for example a custom controller to get the right crop), those are also loaded slow, like the backoffice. My guess is that there is something wrong with my SQL Server (developer edition) setup or similar configuration on my laptop. The weird thing is that the exact same setup worked perfectly fine on my old laptop. Both laptops got Windows 11, and the same version of software installed to make localhost work. My localhost project is using Umbraco 10.8.8, and is a clone of a Cloud project. When I access the backoffice, most of the times I need to wait for about 30 seconds to show to content tree. I checked the network tab, and saw that the "/umbraco/backoffice/umbracotrees/applicationtree/GetApplicationTrees?application=content&tree=&use=main" call is stuck waiting for server response for more than 25 seconds. However this is completely random. Sometimes the backoffice just needs 3 seconds to load. This randomness got me to think there is some kind of scheduled task working in the background that slows the performance or locks the database, but I disabled all of the (custom) scheduled tasks of the project, so this can't be it. If it was only the content tree in the backoffice that loads for 30 seconds, I could live with it, but there is more. Often when I access the media or settings tab in the backoffice, it keeps loading and eventually giving me timeouts. I tried to delete the TEMP folder, and rebuilding the indexers. Most of the times when rebuilding the indexers it gives me a timeout, and it didn't complete. What I also tried was firing up a complete different project in Visual Studio, and experimenting if the backoffice is also slow in other projects, but it seemed to be loading fast. So on the one hand there could be something wrong with my project, or my configuration https://cdn.discordapp.com/attachments/1344605280281038849/1344605280540819486/Timeout-populating-indexers.png?ex=67c184c0&is=67c03340&hm=f25a04a3a145bc9819ef42a46e26d77d99b22fcc802fdfb46744dc2a954d7b1a&
Some extra information: my colleagues work on the same project as me, and do not experience the same slow response, and timeout issues as me. I also tried upgrading Umbraco from 10.8.8 to 13.6.0. This didn't seem to work.
b
I used to have a similar problem on an older laptop a while back. I had "browser link" enabled in Visual Studio which used op all of my poor laptops RAM. Are you running your project from the debugger in Visual Studio?
m
Hey Bram, thank you for your reaction. I am using Visual Studio, but the "View in browser" option.
I can see that the browser link option is disabled, but the css hot reload option is enabled
b
That shouldn't really be an issue I think. Looking at the error there is perhaps something wrong with the database. Are you using a localDb or local mssql instance? Perhaps something is different there compared to your old system?
m
I am using a local mssql instance. My connection string looks like this: "ConnectionStrings": { "umbracoDbDSN": "Data Source=localhost;Initial Catalog=database-name;Integrated Security=True;TrustServerCertificate=True;", "umbracoDbDSN_ProviderName": "System.Data.SqlClient" }, I already tried to uninstall mssql server, and reinstalled it using the default installation option.
I can say that on my old laptop I had the TCP protocol enabled on the MSSQLSERVER service using the sql server configuration manager. I tried to enable this on my current laptop too, but it doesn't seem to have any effect. Only that im able to login to my local instance using my pc-name instead of "localhost".
b
I'm afraid that I'm all out of ideas now 😦
m
Okay thank you!
I guess it's worth a try if I duplicate my project and use SQLite to try to reproduce the issue.
k
Enable TCP and disable named pipes as SQL protocols. Use
.
as hostname instead. Test with SSMS/AzureDataStudio using a similar connection (integrated security) and see if it's slow there as well.
m
Thanks for the suggestion! I tried this, and also restarted the MSSQLSERVER service for the changes to take effect. Unfortunately the issue is still there.
k
Did you SSMS?
m
Well I cannot test this in SSMS because I don't know the exact queries that Umbraco uses to manage nodes.
k
Just
select *
from one of the big tables like the property or node tables to see if it's mysteriously or randomly slow.
m
"SELECT * FROM umbracoPropertyData" takes about 5 seconds, but I guess that's normal considered the amount of records (95.000 +). "SELECT * FROM umbracoNode" is super fast. However interacting with the interface of SSMS is somehow at least 4 times slower than on my old laptop. Like expanding tables, columns, right-clicking on databases. I don't know if that could lead to something. If I compare the speed of the queries in SSMS to the backoffice, I can say it should not have anything to do with slow queries in the database, but rather waiting on a task before the query can start. I don't know if Umbraco has some default background tasks, or maybe the packages I use that could cause these timeout issues? I already disabled all of the custom scheduled tasks of the project.
k
It sounds like the "latency" could be the same in SSMS and Umbraco. How exactly are you connecting to the database with SSMS? Could this be an ipv6 or network interface issue somehow?
Only time I've seen sluggishness in "interacting" with tables/queries/etc as you describe using SSMS/ADS is on very scaled-down Azure SQL databases. Local SQL servers have always been instant.
m
I think this is somehow a network-related issue indeed. I'm gonna test this on a different location with a different network, and let you know if I find anything, thanks!
I didn't experience any timeouts in the backoffice of Umbraco while working at my office or in the train. At my office I am working on Wi-Fi, and also in the train I use my hotspot from my phone to get internet. At my home I am also using Wi-Fi. The weird thing is that I don't even need internet to work on localhost, but maybe it could be something like a configuration mismatch. I am gonna try some different things at home to rule out possible causes.
Okay I think I may have found the cause of the timeouts! Every time a timeout happens, my RAM is always above 14GB/15.5GB (so above 90% of the limit). When my laptop uses more than 90% of it's RAM, SQL Server starts to page out. This results in Umbraco just freezing, and giving timeouts. When I remove my HDMI to DVI cable from my laptop, most of the times Umbraco loads instantly again. So I guess using an external screen may affect the performance of my system significantly. I got a HP ProBook 440 with 16GB of RAM, an Intel Core Ultra 5 running Windows 11. For now I will keep an eye on my memory, and try optimizing it.
I will close this post, because the problem has been solved by adding additional DDR5 RAM to my laptop.
13 Views