Hi Raymond,

I don't see your reply actually... oh here it is in my junk
folder...grrrr...

Tonight when the load test is running, I'll pause midway and swap in a real
file path and see how that runs. 

The only other thing I can think is that there is a name collision and the
file is deleted by another thread who was using the same filename. But the
filename variable IS var scoped (FYI, this IS inside an application scoped
CFC).  

Brook



-----Original Message-----
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: February-22-12 11:38 AM
To: cf-talk
Subject: Re: Ram Disk problem under load


Noticed you didn't reply to my idea... can you also ensure that it really is
a VFS issue by simply switching to a real folder - just for testing?

On Wed, Feb 22, 2012 at 12:05 PM, Brook Davies <cft...@logiforms.com> wrote:
>
> Good idea, I'll check the contents of the ram disk after any failures...
>
> Brook
>
> -----Original Message-----
> From: Pete Freitag [mailto:p...@foundeo.com]
> Sent: February-22-12 9:58 AM
> To: cf-talk
> Subject: Re: Ram Disk problem under load
>
>
> Hi Brook,
>
> Certainly you will want to have a try / catch around that, you could 
> put the delete of the ram file in a <cffinally> tag to ensure it runs, 
> otherwise if an error is thrown in the cfinclude the file never gets 
> deleted and stays in ram.
>
> Also to answer your question about the garbage collection, I don't 
> think that would be the issue, the garbage collector only removes 
> objects that have a reference count of zero, I would assume that when 
> you have a file on the ram disk ColdFusion maintains a reference to 
> it, when you delete the file CF will delete the reference and allow the GC
to cleanup.
>
> I don't think reducing the size of your ram disk will make the problem 
> go away.
>
> What you might want to do is run this after you run your load test to 
> see whats in there:
>
> <cfdirectory directory="ram://" action="list" recurse="true" 
> name="dir"> <cfdump variable="#dir#">
>
> --
> Pete Freitag - Adobe Community Professional http://foundeo.com/ - 
> ColdFusion Consulting & Products http://petefreitag.com/ - My Blog 
> http://hackmycf.com
> - Is your ColdFusion Server Secure?
>
>
>
>
> On Wed, Feb 22, 2012 at 12:44 PM, Brook Davies <cft...@logiforms.com>
wrote:
>
>>
>> Hi Pete,
>>
>> I don't think its possible because the ram disk size is set to 500 
>> megs, and this was only 10 concurrent users!  I have another test 
>> with
>> 100 cuncurrent users running tonight and I guess we'll see what 
>> happens though I am sure this is going to be an issue. I added a 
>> try/catch around the write/read and am them attempting to do it 
>> again, so I guess we'll see what happens.
>>
>> Maybe I should reduce the size allocated to the ram disk?
>>
>> Brook
>>
>> -----Original Message-----
>> From: Pete Freitag [mailto:p...@foundeo.com]
>> Sent: February-22-12 9:35 AM
>> To: cf-talk
>> Subject: Re: Ram Disk problem under load
>>
>>
>> Another thing to consider is that the Ram disk has a size limit 
>> specified in the ColdFusion administrator. Is it possible that the 
>> write failed (perhaps
>> silently) because the ram disk was full.
>>
>>
>> --
>> Pete Freitag - Adobe Community Professional http://foundeo.com/ - 
>> ColdFusion Consulting & Products http://petefreitag.com/ - My Blog 
>> http://hackmycf.com
>> - Is your ColdFusion Server Secure?
>>
>>
>>
>> On Wed, Feb 22, 2012 at 3:12 AM, Brook Davies <cft...@logiforms.com>
>> wrote:
>>
>> >
>> > Hey everyone,
>> >
>> > Did some very light pre-load testing yesterday in preparation for a 
>> > larger test tomorrow. This limited load threw some errors. I'm 
>> > writing to the in memory file system some CFML code, that I then 
>> > cfinclude to
>> execute it.
>> >  Its
>> > pretty straight forward code, and this was under very little load
>> > (10 concurrent users only).
>> >
>> > Note: I have an application mapping for the ram disk in
application.cfc:
>> >
>> > <cfset this.mappings[ "/ram" ]              = "ram://" />
>> >
>> > And then in the problem code:
>> >
>> > ---------------------------------
>> > <!--- set the filename to a unique name ---> <cfset filename = 
>> > 'wildcardparsing-#createUUID()#.cfm'>
>> >        <!--- write the file --->
>> >        <cffile action="write" output="#cfml#" 
>> > file="ram://#filename#"/>
>> >        <!--- include and execute the cfml --->
>> >        <cfinclude template="/ram/#filename#" />
>> > <!--- clean up --->
>> > <cffile action="delete" file="ram://#filename#"/>
>> >
>> > ---------------------------------
>> >
>> > The error I got was:
>> >
>> > Could not find the included template 
>> > /ram/wildcardparsing-66031760-EEDC-69FB-8F2EFEC77564096A.cfm.
>> >
>> > I got a similar error in another template on a different execution 
>> > that uses similar code to generate the CFML for a CFDOCUMENT tag 
>> > and then writes it to ram disk and includes. I have never seen this 
>> > error in development it only started happening under a wee bit of 
>> > load. What could be the problem? The In memory file system is set 
>> > to
>> > 500 megs in the cfadmin (which is probably overkill..). Would a 
>> > garbage collection before the include had been completed cause this 
>> > to
> happen?
>> >
>> > Brook
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350041
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to