Copied to clipboard

Flag this post as spam?

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


  • eatpastacodefasta 5 posts 75 karma points
    24 days ago
    eatpastacodefasta
    0

    Broken media files fix only after disk cleanup

    Hello, I am experiencing a strange issue with some of my Umbraco 7 sites running on different servers, on various releases (7.x.x). The problem has to do with the Media, they disappear out of nowhere and a broken icon is shown instead of the actual image. This is happening both in frontend and in back-office or whenever the image is requested. For a strange reason if I use disk cleanup on the server, the problem gets resolved but not permanently. It will appear again in X days and usually it becomes more and more frequent. My log files all they say is:

    2019-07-25 00:00:37,770 [P17508/D2/T140] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.IO.IOException: The file exists.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.__Error.WinIOError()
       at System.IO.Path.InternalGetTempFileName(Boolean checkHost)
       at ImageProcessor.Web.Plugins.PostProcessor.PostProcessor.PostProcessImage(HttpContext context, MemoryStream stream, String extension)
       at ImageProcessor.Web.Plugins.PostProcessor.PostProcessorApplicationEvents.PostProcess(Object sender, PostProcessingEventArgs e)
       at ImageProcessor.Web.HttpModules.ImageProcessingModule.
  • Giles Olley 8 posts 82 karma points
    1 week ago
    Giles Olley
    1

    We're having the same problem. It started on one site, on one server and is now spreading to multiple sites.

    We're looking at the PostProcessor code to try and understand what's happening but would be grateful if you have found a solution and can let me know how you fixed it.

    If I find a solution, I will reply with it.

  • eatpastacodefasta 5 posts 75 karma points
    1 week ago
    eatpastacodefasta
    0

    Thanks for replying. Problem still persists.

  • Giles Olley 8 posts 82 karma points
    1 week ago
    Giles Olley
    0

    We've noticed this is happening specifically on one of our shared servers which is getting pretty full including with more and more U7 sites, which are all consuming fairly dramatic resources (despite us being mindful of that in their creation). Some recent U7 sites are easily consuming a Gigabyte of RAM under normal use!

  • eatpastacodefasta 5 posts 75 karma points
    1 week ago
    eatpastacodefasta
    0

    Same is happening in my servers too. They host many Umbraco sites each, some are simple projects, and others are monstrous applications ... The day I posted the OP I cleaned up the temp files on one of my servers manually by hand without the help of disk cleanup. Strangely everything is running smooth for now. Let's see !

  • Giles Olley 8 posts 82 karma points
    1 week ago
    Giles Olley
    0

    I decided to do some digging into the error and specifically where the issue is happening in Post Processor. Clearly an unhandled exception should never be happening... and concurrency issues/file locking when the server is perhaps performing sub-optimal was looking to me like the most likely thing...

    Then I discovered this from June 2018: https://github.com/JimBobSquarePants/ImageProcessor/commit/63e6b40b6d2d0cb49fde680571ba11e9bc2582b5#diff-5275fef38e7728a2a6c8f86eb6b2f309

    My error includes the use of method "PostProcessImage" which has now been replaced with "PostProcessImageAsync".

    Umbraco currently uses a version of Image Processor from before that checkin. If you look closely, you'll see that it also now has proper error handling that would stop async/concurrency errors from locking things up.

    I think this is simply a concurrency bug in ImageProcessor that's now been fixed. I'm going to see if I can get a later version of ImageProcessor working and get back here.

  • Giles Olley 8 posts 82 karma points
    1 week ago
    Giles Olley
    0

    Be aware also that Image Processor haven't updated their Assembly versions since 2017, so the Nuget versions don't match the file versions. Annoying :P

Please Sign in or register to post replies

Write your reply to:

Draft