Copied to clipboard

Flag this post as spam?

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


  • rob 75 posts 170 karma points
    Nov 09, 2016 @ 14:35
    rob
    0

    Specific complexity PNGs fail to upload with DFS

    This is real beauty. We have multiple Umbraco instances in multiple environments. When uploading a certain image Umbraco gives "An error has occurred".

    So its a bad image? Nope, I have managed to create a suite of four images that demonstrate the issue based on PNG complexity. Tried re-saving the image in different image programs and varieties.

    This never happens with JPG files and only when DFS is used to replicate the media folder.

    First thought was file size. Nope, can upload images up to 50mb before the error states clearly that the file exceeds 50mb. Problem image is 1.4mb

    When the error occurs procmon will note a "SHARING VIOLATION" (path is the thumbnail) that does not appear when a working image is uploaded. But numerous investigations show that "SHARING VIOLATION" for DFS environments is not and error. Indeed, the image file plus expected thumbnails are physically created and replicated. The App_Data\Temp\FileUploads however fills up with the failures, successful uploads are correctly removed.

    Here are four PNG images 1280x800. Each time I attempted to upload these I repeated it three times to ensure consistency.

    • "random 1292x800.png" random pixels - Always fails in DFS environment
    • "uniform black 1292x800.png" solid black - Always succeeds in DFS
    • "random 1292x800 3 450px.png" random pixels with 450 pixels with white block on left - Always fails in DFS environment
    • "random 1292x800 3 550px.png" random pixels with 550 pixels with white block on left - Always succeeds in DFS environment

    random 1292x800.png uniform black 1292x800.png random 1292x800 3 450px.png random 1292x800 3 550px.png

    Only the media folder is DFS, all the rest is local to each instance. Only a single machine per environment is a master and can be used to upload media items. DFS access is via a name space UNC path.

    Set web.config:

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="204800" executionTimeout="99999" />
    

    but made no difference to

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="51200" fcnMode="Single" />
    

    And tried Umbraco 7.4.3 and 7.2.4

    To me this sounds like a timing issue directly related to the time taken to process the PNG image.

    But where do I go to fix it? Losing DFS is not an option.

    This has to be to weirdest issue I have ever come across.

  • rob 75 posts 170 karma points
    Nov 09, 2016 @ 14:39
    rob
    0

    forgot to mention, with logging on I see

    ERROR Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute - Could not acquire actionExecutedContext.Response.Content
    ystem.NullReferenceException: Object reference not set to an instance of an object.
      at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
    

    in the Umbraco log.

    But researching that indicates its not an issue.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Nov 09, 2016 @ 18:19
    Jeavon Leopold
    0

    I have seen this issue also with DFS and pngs only, cross reference with my comments on YouTrack http://issues.umbraco.org/issue/U4-6334

  • rob 75 posts 170 karma points
    Nov 10, 2016 @ 13:07
    rob
    0

    setting <add key="aspnet:UseTaskFriendlySynchronizationContext" value="false" />

    broke all media file uploads.

    I am only ever uploading one file at a time and not using drag and drop.

  • rob 75 posts 170 karma points
    Nov 14, 2016 @ 11:51
    rob
    0

    had to give up and upload a different file then manually update the physical file.

    Hope this does not come up to often. I notice our designers are using bigger and more detailed background images for new sites. {worried smiley}

  • Søren Lysdal 13 posts 75 karma points
    Oct 25, 2017 @ 20:23
    Søren Lysdal
    0

    Hi, did you ever out a proper solution to this issue?

    We're using version 7.5.12 and are having this issue in DFS, the files you provided fit the cases on our server as well.

  • Shannon Deminick 1524 posts 5269 karma points MVP 2x
    Oct 25, 2017 @ 21:22
    Shannon Deminick
    0

    I suspect the underlying problem will be the image manipulation done on upload, not the upload itself. I'm 7.7 we don't generate thumbnails anymore because those should be lazily generated by image processor. Are you able to test with the very latest version of umbraco?

  • Søren Lysdal 13 posts 75 karma points
    Oct 26, 2017 @ 10:43
    Søren Lysdal
    0

    Unfortunately we cant test it with 7.7 right away.

    Is there any way to disable the thumbnail generation, and what penalties would we get from it?

  • Shannon Deminick 1524 posts 5269 karma points MVP 2x
    Oct 26, 2017 @ 10:54
    Shannon Deminick
    0

    Not much uses those old thumbnails anymore which is also part of the reason we removed them.

    What I mean about testing 7.7 is if you can replicate this issue simply by using these images, could you just install a vanilla 7.7 version on your local machine and test it to see if the problem has gone away? I don't mean testing this on your full blown solution. I also assume you can replicate this issue on a vanilla 7.5.12 solution?

    I'm unsure about disabling them on old versions, i'd have to go dig in the source to see if that's possible.

  • Søren Lysdal 13 posts 75 karma points
    Oct 26, 2017 @ 11:11
    Søren Lysdal
    0

    The issue only shows itself on environments with DFS enabled.

  • Shannon Deminick 1524 posts 5269 karma points MVP 2x
    Oct 26, 2017 @ 11:48
    Shannon Deminick
    0

    Ah, of course silly me

Please Sign in or register to post replies

Write your reply to:

Draft