Reading Large Log Files with CFFile

I am reading my iis log files into my database with CFFile so I can create custom stat reports for my clients. Problem is the files are now getting to be above 160Mb and sometimes CFfile does not do anything. I guess it tries to read the file, but fails. I am on a shared server. See code below what I am using.

Is there anyway to read the log files that won't cause it to fail?
<cfset timeoutVar = "500"><cfsetting RequestTimeout = "#timeoutVar#">
<cfset mydate = "#dateformat(application.mydate,'yymmdd')#">
    
<!------------ By default set value ------------>
<cfparam name="file2load" default="D:\inetpub\mydomain\stats\ex#mydate#.log">
 
<!------------ Load the file ---------------->
<cffile action="READ" file="#file2load#" variable="log_data">
 
Log file Read<hr>

Open in new window

monosythAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jones911Commented:
Reading 100mb into memory is a bad idea.

If you are on CF8 try rear say 1k lines at a time with fileReadLine()

http://cfquickdocs.com/cf8/?getDoc=cffilee#FileReadLine
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.