Images disappear on Azure Devops build/swap - Umbraco 8.14
Our server setup is an Azure server with 1 deployment slot and one live slot with Azure front door in front of the live slot. Media is served through Azure Blob Storage and I can confirm the images that disappear all still exist and didn't move.
I have an Azure Devops pipeline pushing to the deployment slot. After a build I navigate to the slot first to make sure the server is warmed up and it looks good. The images are all present on the slot. I then use Devops to swap the slot to the live slot. When the swap is done, (almost) everything is gone on the live slot. The images still exist on blob storage but I just get "System.Web.StaticFileHandler.GetFileInfo: File does not exist" errors instead on the live server. This does not happen to all images, just a vast majority. If I restart the server everything comes back as if nothing was wrong. I tried deleting the examine indexes in the App_Data folder in case they were just bad files. I do have the settings outlined here for Umbraco 8
I also found if I swap the slots again (without restarting to "fix" the issue) the images will come back and now the deployment slot is the one that is bad. This is less consistent though.
When you request an image from Umbraco, the FileSystemProvider config is pointing to blob storage and storing/retrieving your image....
....if there are any querystring params on the request (or ImageProcessor is configured to process all image requests) then ImageProcessor 'processes the image' and stores a copy of the processed image in a cache... subsequent requests for the image are served directly from the cache...
so I'm wondering if your cache is set to disk whether that could be mucking things up when you switch?
When this occurs, if you request the same image that is not displaying but with different querystring parameters - does this return the image?? eg this would be a fresh processing request for the image, so if it's actioned and returns an image, it will show it's not an issue with Image Processor, but more to do with how an existingly processed image is cached.
You can either move the cache to blob storage, or perhaps clear out the Image Processor cache on disk, if that's how you have it configured, eg /app_data/temp/cache
I have the cache.config and security.config configured to use blob storage for everything (I think). I can confirm that images uploaded to Umbraco have ended up on blob storage and in the cache container, as I expected. On build, they just don't appear on the site until a restart. As a backup for now, I have moved them from blob storage back into the actual file system Media folder until I can figure out this issue though. The following are my configs and how I access the images.
On the site I access images uploaded to umbraco using the MediaItem.Url() function. Some are lazy loaded, some are not, but they all end up with the same code.
but I unified them all to the first version when this didn't seem to make a difference.
If I am exclusively using azure blob storage, do I need both, CloudImageService AND AzureImageService, only one of them, or is anything else missing from there?
Lastly, (and least) Do I need the "EndpointSuffix" attribute in any of the StorageAccount settings?
Images disappear on Azure Devops build/swap - Umbraco 8.14
Our server setup is an Azure server with 1 deployment slot and one live slot with Azure front door in front of the live slot. Media is served through Azure Blob Storage and I can confirm the images that disappear all still exist and didn't move.
I have an Azure Devops pipeline pushing to the deployment slot. After a build I navigate to the slot first to make sure the server is warmed up and it looks good. The images are all present on the slot. I then use Devops to swap the slot to the live slot. When the swap is done, (almost) everything is gone on the live slot. The images still exist on blob storage but I just get "System.Web.StaticFileHandler.GetFileInfo: File does not exist" errors instead on the live server. This does not happen to all images, just a vast majority. If I restart the server everything comes back as if nothing was wrong. I tried deleting the examine indexes in the App_Data folder in case they were just bad files. I do have the settings outlined here for Umbraco 8
https://our.umbraco.com/Documentation/Fundamentals/Setup/Server-Setup/azure-web-apps-v8
I also found if I swap the slots again (without restarting to "fix" the issue) the images will come back and now the deployment slot is the one that is bad. This is less consistent though.
My issue also sounds very similar to this one, https://github.com/umbraco/Umbraco-CMS/issues/7868, but this is from 8.6 and sounds like it was resolved.
Hi Alex
How are you configuring ImageProcessor's cache? Are you storing the Cache in blob storage too? or on the local disk?
https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/index-v8#using-azure-blob-cache
When you request an image from Umbraco, the FileSystemProvider config is pointing to blob storage and storing/retrieving your image....
....if there are any querystring params on the request (or ImageProcessor is configured to process all image requests) then ImageProcessor 'processes the image' and stores a copy of the processed image in a cache... subsequent requests for the image are served directly from the cache...
so I'm wondering if your cache is set to disk whether that could be mucking things up when you switch?
When this occurs, if you request the same image that is not displaying but with different querystring parameters - does this return the image?? eg this would be a fresh processing request for the image, so if it's actioned and returns an image, it will show it's not an issue with Image Processor, but more to do with how an existingly processed image is cached.
You can either move the cache to blob storage, or perhaps clear out the Image Processor cache on disk, if that's how you have it configured, eg /app_data/temp/cache
regards
Marc
I have the cache.config and security.config configured to use blob storage for everything (I think). I can confirm that images uploaded to Umbraco have ended up on blob storage and in the cache container, as I expected. On build, they just don't appear on the site until a restart. As a backup for now, I have moved them from blob storage back into the actual file system Media folder until I can figure out this issue though. The following are my configs and how I access the images.
cache.config
security.config
On the site I access images uploaded to umbraco using the MediaItem.Url() function. Some are lazy loaded, some are not, but they all end up with the same code.
Some images used to have this wrapper
but I unified them all to the first version when this didn't seem to make a difference.
If I am exclusively using azure blob storage, do I need both, CloudImageService AND AzureImageService, only one of them, or is anything else missing from there?
Lastly, (and least) Do I need the "EndpointSuffix" attribute in any of the StorageAccount settings?
is working on a reply...