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)
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:
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
Thanks
Ver
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:
Its specified in bit, so the above example is 80mb.
Maybe could be of help.
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:
and
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
Ok, then i have no clue sorry. :(
Maybe some other friendly soul will come to the rescue soon! :)
Good luck!
is working on a reply...