Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a website that I developed for a client in 2018 and have maintained since.
A few weeks ago it started to load really slowly, especially the images.
I tried just about everything. I reduced the size of the images and set all images to serve in a webp format, set the lazyloads for all images, upgraded the Umbraco version to 7.15.7... nothing returns it to reasonable loading times.
After all of the above, images that weigh (much) less than 100kb, are still loaded after 3-5s (almost all of it is TTFB), each:
I suspect something in the imageProcessor is not working properly so the images are not being processed properly. Despite the crop and the format change to webp, they still weigh quite a bit:
Although even at such sizes, there should be no such loading times...
I have also increased server CPU and RAM, and other umbraco websites on the same server are loading very fast.
Has anyone encountered anything similar in the past? Are there other things you would do / check to try to deal with this problem?
I would greatly appreciate any suggestion. Thanks!
Just one quick thought...
Have you rebuilt your examine internal index from the developers section?
The media uses the internal examine index as a bit of a caching layer - if the index is empty/corrupt/locked it falls back to database... to get the Media Item - which could explain the consistent lag times...
Other thing would be any third party packages, eg Media Protect that are handling all requests to media, and looking up in a db table to see if people are permitted to see the file (albeit this is cached I think).
Thanks for the comment.
I did not think in that direction, and had some hopes while reading your comment cause it makes sense, so I tried to rebuild the indexes - but it did not help :(
The only package installed in the context of media is a Tinifier but I do not think it interferes with the way the file is loaded but more with the way it is stored, so I do not suspect it...
Any further thoughts?
Disk space (I'm sure you've checked) and permissions, have you ImageProcessor configured to store its cache on disk? /app_data/cache or in blob storage? and are files being updated in this folder when you request a new image. (you can clear this folder out)
If you request an image directly in the browser with different widths eg
this will tell you whether ImageProcessor, is actually configured correctly to resize the images or not.
(if not then review the /config/imageprocessor/ configuration files...)
Are images requested without the querystring similarly slow to display? (basically is it the processing/serving image from cache)
And are images requested outside of the media folder similarly slow?
(should rule out third party packages handling media requests)
But that's just some other random thoughts...
(One thing I thought is obvious and didn't mention - Its happens only for first visitors. After the browser caches the images everything works fine, but I check it with the disable cache / incognito mode to improve first visitor experience.)
Disk space has spare 50GB.
Files stores on disk.
The images are resized properly by the ImageProcessor, and stored in the app_data/cache folder.
Images slow to display without querystrings too, always long TTFB on this specific website.
I took one image from the /media/ for test - and copied it to /img/ folder of this website, and another umbraco 7.15.7 website hosted on the same server. On this one it consistently takes 500-1500ms of TTFB, and on the other one its 20-150 TTFB...
After realizing that the image loads at different times in two very similar installations as in the previous comment, we started comparing the projects and noticed that the most significant difference is the database version: the slow site used SQL CE for historical reasons ...
Moving to SQL Server 2016 solved the whole problem...
Hope this will save some hours of frustration from other members here in the community :)
Nice, glad you got to the bottom of it... yeah SQL CE not great for production!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted