NOTICE: We are now using the Mura CMS Developer's Google Group for our Forum. While you can no longer post messages here, this forum will remain archived but unmonitored. Other support options are available here.

Next Page

Page: 1

Previous Page

Thread: File Uploads - java.lang.OutOfMemoryError

Created on: 12/24/10 12:24 AM

Replies: 6

PeterB





Joined: 07/12/10

Posts: 8

File Uploads - java.lang.OutOfMemoryError
12/24/10 12:24 AM

Hello,
we are having major problems with large file uploads in Mura.
We are trying to upload FLV files between 50 - 70 mb and get java.lang.OutOfMemoryError at java.io.FileOutputStream.writeBytes(Native Method)...

It is falling over in cms\requirements\mura\fileWriter.cfc at line 54

this is...

<cffile action="write" mode="#arguments.mode#" file="#arguments.file#" output="#arguments.output#" addnewline="#arguments.addNewLine#"/>


from reading about this message in Mura and for cffile in general, it seems there can be performance issues with the way cffile is holding the file in memory.

We are running IIS7, we have 4GB RAM and have set the Maximum JVM Heap Size (MB) to 1024.

Does anyone have any ideas how to work around this or other fixes. The files are not huge for video content.

thanks

Peter

Link | Top | Bottom

Fluid





Joined: 09/12/09

Posts: 119

RE: File Uploads - java.lang.OutOfMemoryError
12/24/10 2:48 AM

Hi Peter,

No idea is this is related but we were having issues uploading any file larger than 28MB.

We're using IIS7, 2GB of RAM, and CF9 Enterprise. CF9 was already set to allow file uploads up to 100MB but nothing over 28MB was working.

We realized it was IIS7 that has a default maximum upload size of 28.6MB but can be easily changed on a per site basis.

After we changed the IIS7 setting to allow file uploads up to 100MB (or more specifically 104857600 to mirror the setting in CF9) our 40-50+MB files were uploading nice and fast.

Again, no idea if it's related but it's worth double checking. Here's a link that helped me. Actually it was the comment at the end of the post that made it simple:

IIS7 File Upload Size Limits

Let me know how it goes! - Alex

Link | Top | Bottom

steve



steve's Gravatar

Joined: 05/18/09

Posts: 935

RE: File Uploads - java.lang.OutOfMemoryError
01/07/11 8:52 AM

@Alex,
thanks for chiming in.

@Peter,
hopefully Alex's suggestion worked out for you.

------------------------------------------------
steve withington
blueriver.com // getmura.com

Link | Top | Bottom

kcitsstick



kcitsstick's Gravatar

Joined: 02/05/09

Posts: 431

RE: File Uploads - java.lang.OutOfMemoryError
01/10/11 3:25 AM

This is also the issue in IIS 7.5 The steps to fix this are: open the Configuration Editor for the given site, in the drop down Section navigate to: system.webServer/security/requestFiltering on the list of options expand requestLimits and for the entry maxAllowedContentLength change it to match your CF settings. Like Fluid has above, changing the entry to 104857600 when your CF settings are at 100MB.

Hope that helps someone else. :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stephen "Stick" Hazen
We program our web sites using a fast guy in tights, a movie about coffee, and nuclear power!
www.kcits.com

Link | Top | Bottom

PeterB





Joined: 07/12/10

Posts: 8

RE: File Uploads - java.lang.OutOfMemoryError
01/10/11 4:48 AM

Hi,
thank you very much for the suggestions.
I am very sorry for the delay in replying.

These suggestions make a lot of sense and I have tested them today.
Unfortunately, I have checked our maxAllowedContentLength limits and they should be large enough.
They are currently set to 1024000000.

From the error message java.lang.OutOfMemoryError at java.io.FileOutputStream.writeBytes(Native Method)... I was assuming it has something to do with running out of memory when CFFile is holding it in memory.

It seems to be specifically occuring in cms\requirements\mura\fileWriter.cfc at line 54.
This is when the file is already being held in memory and then used in a cffile write.

thanks very much for the advice.

Peter

Link | Top | Bottom

kpayne





Joined: 02/03/10

Posts: 56

RE: File Uploads - java.lang.OutOfMemoryError
02/07/11 8:19 AM

I've been experiencing this same issue for the last year. We are using IIS6/Windows2003/cf8.0.1 (all patches applied).

Same line of code in filewriter.cfc. When debugging the process it seems the upload is fine but bombs on the cffile write action. It happens 95% of the time on files over 20mb but occasionally even on size of 4mb.

I checked out the IIS6 setting approach but it looked to me like this was just for asp.net apps? In any case our other systems that run onjrun and don't use Mura can upload over 200mb no problem. It must have something to do with all the manipulation done in Mura to the file in memory that is causing this? I thought I read somewhere that using cffile from within a cfc can cause memory problems?

It may be a CF8 issue but after many hours of searching I didn't find any tech notes or other folks having the exact same problem (other than something close in one of patches). I've been meaning to open a trouble ticket with Adobe but haven't gotten around to it. But its time to get this figured out once and for all.

If anyone can shed any light on this or suggest a way to debug/test the system we would all appreciate it.

Link | Top | Bottom

kpayne





Joined: 02/03/10

Posts: 56

RE: File Uploads - java.lang.OutOfMemoryError
03/10/11 6:11 AM

Update - We finally resolved this issue. The JVM max heap setting was set too high (1.3G). Wen we set the value to 1.1G it solved our problem (so far).

Even though the theoretical limit is 1.4G a few people on the Adobe forums indicated with the 1.3G setting and how Mura's OO approach to application scoped cfc usage uses "other" memory pools (permgen?, native heap?) more heavily. This "other" memory pool was what was actually running out of memory. Whatever the true cause, changing the max JVM memory allocation limit did the trick.

Link | Top | Bottom

Next Page

Page: 1

Previous Page