Do you have code that calls ApplicationStop() on error or something I
wonder if that might cause the application scoped mappings to be undefined
for a split second while the application is reloading? Just a guess.



On Thu, Feb 23, 2012 at 1:10 PM, Brook Davies <cft...@logiforms.com> wrote:

>
> So we ran a load test last night with 100 concurrent users. Everything went
> fine *except* this ram disk problem  and another problem with a missing
> template include. Looking at it closer, both errors "Could not find the
> included template" used application mappings to do the include.
>
> These are defined in the application.cfc:
>
> <cfcomponent output="false" extends="coldfireApplication">
>
>  <cfset this.name                        = 'YourMama'>
>  <cfset this.mappings[ "/publicroot" ]       = webroot & 'web\public\' />
>  <cfset this.mappings[ "/ram" ]                   = "ram://" />
>
> </cfcomponent>
>
> Cf 8.01 had a hotfix that was supposed to fix  custom tag path mappings
> acting up under load:
> http://kb2.adobe.com/cps/529/cpsid_52915.html
>
> 73761   Fix for the error "Cannot find CFML template for custom tag" thrown
> under load when using THIS.customtagpath in application.cfc and "enable per
> app settings" is enabled.
>
>
> But I am running CF 9.01 with all the hotfixes. BTW, I dumped the ram disk
> after some failed includes and the file *did exist* on the ram disk.
>
> ------
>
> I just did another load test this morning, however this time the load was
> all done on a single application testing a form submission process (this is
> where the include error was generated). No errors this time. The difference
> between this test and the last test that generated lots of errors is that
> this test did not run concurrent load on the other side of this application
> which uses an application.cfc that extends the main application.cfc via
> applicationProxy.cfc. It’s a child application that shares the main
> applications name and scope but also enables client variables and does some
> other stuff (pseudo code below)
>
> <cfcomponent output="false" extends="ApplicationProxy">
>       <cfset this.clientManagement    = true>
>      <cfset this.setClientCookies        = true>
>      <cfset this.setDomainCookies    = true>
>     <cfset this.clientStorage                = 'LF-CLIENTVARS'>
>
>     <!--- NO MAPPINGS HERE LIKE IN THE MAIN APPLICATION.CFC. COULD THAT
> BE THE PROBLEM?? --->
>
>  <cffunction name="onRequestStart" returnType="boolean" output="false">
>        <cfargument name="thePage" type="string" required="true">
>             <cfset super.onRequestStart(arguments.thePage)>
>            <cfreturn true>
>  </cffunction>
>
> </cfcomponent>
>
> -------
>
> So my guess is that because it doesn't include the application mappings
> that
> it is somehow overwriting them when two requests run at the same time.
> Strange I know, but that’s the best I can figure. I am gonna run another
> load test tomorrow night, and try adding the mappings into the child
> application and see if that helps.
>
>
>
> Brook
>
>
> -----Original Message-----
> From: Brook Davies [mailto:cft...@logiforms.com]
> Sent: February-22-12 12:30 PM
> To: cf-talk
> Subject: RE: Ram Disk problem under load
>
>
> 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:350074
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to