Copied to clipboard

Flag this post as spam?

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


  • Veronica Burd 76 posts 201 karma points
    Mar 17, 2016 @ 10:03
    Veronica Burd
    0

    ImageProcessor - OutOfMemory when trying to upload mp3 file - 7.4.1

    Hi,

    I'm trying to upload a 60 MB mp3 file to my media section and keep getting an OutOfMemory exception. From the stack trace the error is occurring within ImageProcessor, thing is, since this an MP3 file, why is ImageProcessor trying to handle the file?

    I'm using ImageProcessor v2.3.3.0 and ImageProcessor.Web v4.5.3.0 installed as dependencies of Umbraco v7.4.1 via nuget

        2016-03-17 10:37:09,940 [P8828/D5/T50] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.TypeInitializationException: The type initializer for 'ImageProcessor.Web.Helpers.ImageHelpers' threw an exception. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
       at System.Reflection.AssemblyName.nGetFileInformation(String s)
       at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
       at ImageProcessor.Common.Helpers.TypeFinder.GetAllAssemblies()
       at ImageProcessor.Common.Helpers.TypeFinder.GetFilteredAssemblies(IEnumerable`1 excludeFromResults, String[] exclusionFilter)
       at ImageProcessor.Common.Helpers.TypeFinder.GetAssembliesWithKnownExclusions(IEnumerable`1 excludeFromResults)
       at ImageProcessor.Configuration.ImageProcessorBootstrapper.LoadSupportedImageFormats()
       at ImageProcessor.Configuration.ImageProcessorBootstrapper..ctor()
       at ImageProcessor.Configuration.ImageProcessorBootstrapper.<.cctor>b__8()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at ImageProcessor.Configuration.ImageProcessorBootstrapper.get_Instance()
       at ImageProcessor.Web.Helpers.ImageHelpers.BuildExtensionRegexPattern()
       at ImageProcessor.Web.Helpers.ImageHelpers..cctor()
       --- End of inner exception stack trace ---
       at ImageProcessor.Web.Helpers.ImageHelpers.IsValidImageExtension(String fileName)
       at ImageProcessor.Web.Services.LocalFileImageService.IsValidRequest(String path)
       at ImageProcessor.Web.HttpModules.ImageProcessingModule.GetImageServiceForRequest(HttpRequest request)
       at ImageProcessor.Web.HttpModules.ImageProcessingModule.<ProcessImageAsync>d__b.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    Thanks

    Ver

  • Dennis Adolfi 1082 posts 6445 karma points MVP 5x c-trib
    Mar 17, 2016 @ 10:11
    Dennis Adolfi
    0

    Have you opened up for your application to upload such big files? Usally the IIS acceptes like 4MB, but you can open it up by adding this to your web.config:

    <httpRuntime executionTimeout="600" maxRequestLength="83886080" requestLengthDiskThreshold="83886080"  />
    

    Its specified in bit, so the above example is 80mb.

    Maybe could be of help.

  • Veronica Burd 76 posts 201 karma points
    Mar 17, 2016 @ 11:04
    Veronica Burd
    0

    Thanks for the reply.

    I've already changed the config settings to allow for file sizes up to 512MB. Specifically I set the following in web.config:

    <system.web>
        <httpRuntime maxRequestLength="524288" requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5"  executionTimeout="99999"
          fcnMode="Single"/>
    </system.web>
    

    and

    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="52428800"/>
      </requestFiltering>
    </security>
    

    According to https://msdn.microsoft.com/en-us/library/e1f13641(v=vs.85).aspx maxRequestLength should be in kb

    So I don't think that's the issue.

    Thanks

    Ver

  • Dennis Adolfi 1082 posts 6445 karma points MVP 5x c-trib
    Mar 17, 2016 @ 11:07
    Dennis Adolfi
    1

    Ok, then i have no clue sorry. :(

    Maybe some other friendly soul will come to the rescue soon! :)

    Good luck!

Please Sign in or register to post replies

Write your reply to:

Draft