Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AvihayBit 149 posts 303 karma points
    Oct 08, 2021 @ 09:08
    AvihayBit
    0

    Very slow TTFB for all images in specific U7.15.7 website

    Hi folks,

    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: enter image description here

    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: enter image description here 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!

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Oct 08, 2021 @ 10:01
    Marc Goodson
    0

    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).

    regards

    Marc

  • AvihayBit 149 posts 303 karma points
    Oct 09, 2021 @ 20:35
    AvihayBit
    0

    Hi Marc, 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?

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Oct 10, 2021 @ 06:57
    Marc Goodson
    0

    Hi AvihayBit

    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

    abovefooterbg.jpg?width=50 abovefooterbg.jpg?width=100

    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...

    regards

    Marc

  • AvihayBit 149 posts 303 karma points
    Oct 10, 2021 @ 08:39
    AvihayBit
    100

    (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...

  • AvihayBit 149 posts 303 karma points
    Oct 10, 2021 @ 13:53
    AvihayBit
    0

    FOUND IT!!

    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 :)

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Oct 10, 2021 @ 20:43
    Marc Goodson
    0

    Nice, glad you got to the bottom of it... yeah SQL CE not great for production!

Please Sign in or register to post replies

Write your reply to:

Draft