>From http://www.tri-phase.com/data/pdf/coldfusioncookbook41.pdf

Does CFFILE have a file size limit?

There is no specific limit on file size for CFFILE. However, CFFILE loads 
the file into the server's memory, so you will get an error if the file size 
exceeds the amount of free RAM.

Also note, you can place a server wide limit on the size of uploads in the 
CF administrator. Under the "settings" link, see: Maximum size of post data 
(MB), Request throttle threshold (MB),
and Request throttle memory (MB).


----- Original Message ----- 
From: "Sarah Geren" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Monday, January 21, 2008 1:27 PM
Subject: Read large binary file, MX7?


> Hello,
>
> I have an application which uses CFFILE to read a binary file into a 
> variable, and that variable is used to write out the video to the brower 
> so someone can download it...
> This code is working great, until the file sizes become too large. It 
> seems to stop working (and returns a null null or 500 null error) when the 
> file sizes go past 200-250MB...
> There are some files on this server that are up to 1GB in size that have 
> to be downloaded via this script, so it needs to be able to handle pretty 
> big files.
>
> The server is MX7, 4GB Ram, and here are my java args:
>
> java.args=-server  -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms1024m 
>  -Xmx1024m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m
> -XX:PermSize=64m -Dcoldfusion.rootDir={application.home}/../ 
> -Dcoldfusion.libPath={application.home}/../lib 
>  -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
> -XX:NewSize=48m  
> -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars
>
> Any help would be appreciated!
> Thanks!
>
> <cffile action="readbinary" file="#scene_data.mpeg#" variable="video">
> <cfheader name="Content-disposition" value="attachment; 
> filename=scene_#scene_id#.mpg">
> <cfscript>
>    context = getPageContext();
>    context.setFlushOutput(false);
>    response = context.getResponse().getResponse();
>    out = response.getOutputStream();
>    response.setContentType("video/mpeg");
>    response.setContentLength(arrayLen(video));
>    out.write(video);
>    out.flush();
> response.reset();
> out.close();
> </cfscript>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297021
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to