trouble getting this app to start-up under load. I have already de-selected
the save class files option because there were LOTS of class files, and I
think this helped a bit.
There is definitely something fishy going on, but I am not sure where it is
exactly. My application contains two parts, they share an application.cfm
file, but within that application.cfm file there are two different
cfapplication tags. The main application is all pages other than a single
cfm page that is used to handle 'external' requests. So, in pseudo code,
the application.cfm does this:
<cfif cgi.PATH_INFO is "/external_requesthandler.cfm">
<!--- external request application framework --->
<cfapplication name="logiformsV2_external">
<!--- do initialization here --->
<cfelse>
<!--- site & member area application --->
<cfapplication name="logiformsV2" setclientcookies="yes"
clientmanagement="yes" clientstorage="logiforms_clientvars">
<!--- do initialization here --->
</cfif>
The reason I am pointing this out, is because one of the applications, the
site logiformsV2, starts up much more smoothly than the external request
handling site (which essentially handles form submissions) which can hang
forever...
If we focus on the 'problem' app, the initialization code in the
application.cfm looks like this:
<cfif not isdefined("application.ComponentInstance.lfInsertData") or
(attributes.refreshnow)>
<!--- if the components are not defined set this var to true --->
<cflock type="EXCLUSIVE" scope="APPLICATION" timeout="60">
<!--- this flag will ensure that components are created by this
thread only --->
<cfif not isdefined("application.ComponentInstance.lfInsertData")>
<cflog file="startupLog" date="yes" text="Running
Instantiation of external application components">
<cfobject component =
"lfcomponents.triggers.triggerAction" name =
"application.ComponentInstance.triggerAction">
<cfobject component = "lfcomponents.lfinsert_record" name
= "application.ComponentInstance.lfInsertData">
<cfobject component = "lfcomponents.lfincrement" name =
"application.ComponentInstance.lfincrement">
<cfobject component = "lfcomponents.lfcreatetable" name =
"application.ComponentInstance.lfcreatetable">
<cfobject component = "lfcomponents.lfdescript_string"
name = "application.ComponentInstance.lfdescript_string">
</cfif>
</cflock>
</cfif>
Now, my startup log file only contains one line, which I guess indicates
that this is working, and only being run by one thread.
"Information","jrpp-18","06/29/04","12:20:49","LOGIFORMSV2_EXTERNAL","Running
Instantiation of external application components"
But, for whatever reason, this app still has a hell of a time starting up.
Sometimes the thread count will grow and grow and the processor will sit at 0!
If I set the server's timeout to 20 seconds, that seems to help get the
server started, about 10 threads will timeout, but then the server will get
started. The threads that timeout are usually, cfquery,cfmail and cfloops
in various places. The really strange thing is that, on the first run, if
I look at the template execution stack and look for what took so bloody
long, there is usually always one template that took a really long time.
But this changes from time to time, and if I manually exclude that template
from the startup sequence, another template (unrelated) becomes the long
running template....
Anyways, I got some serious problems, and If I don't fix em, I ain't going
to Mexico this summer! lol
I wish there was a way to get a more detailed look at what the server is
doing internally while it was starting up, like what templates/code it is
hanging on etc...
Brook Davies
logiforms.com
At 01:18 PM 6/29/2004, you wrote:
>Do you have a lot of application variables/CFC instances that you're setting
>up on the first reqeust to the application? Make sure that you're locking
>them correctly, effectively single threading requests until the first
>request has finished initializing everything. That's has the side effect of
>piling up all kinds of requests on the server that are just waiting for the
>initialization to commence, and then when the first request finishes,
>they'll all be released to do their tasks.
>
>You could use a short timeout on the CFLOCK tag that prevents multiple
>requests from initializing the app vars, catch the exception, and abort the
>request at that point. That'd make sure that no requests were stacking up,
>but at the expense of not servicing requests until the app is up and
>running.
>
>Also, you might consider switching the "save class files" setting in the CF
>admin. If you've got a huge number of files, it's probably faster to leave
>it unchecked (scanning huge directories is expensive), but if you have a
>smaller number, it'll be faster with it checked, because CF won't have to
>recompile everything when it starts.
>
>Cheers,
>barneyb
>
> > -----Original Message-----
> > From: Brook Davies [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 29, 2004 12:41 PM
> > To: CF-Talk
> > Subject: Debugging CFMX
> >
> > My CFMX server has tons of trouble starting up under load. Is there a
> > debugging method I can use to see exactly what each thread is
> > doing when
> > trying to start up or someother way I can find the problem?
> >
> > Brook
>
>----------
>[<http://www.houseoffusion.com/lists.cfm/link=t:4>Todays Threads]
>[<http://www.houseoffusion.com/lists.cfm/link=i:4:168611>This Message]
>[<http://www.houseoffusion.com/lists.cfm/link=s:4>Subscription]
>[<http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=905.825.4>Fast
> Unsubscribe] [<http://www.houseoffusion.com/signin/>User Settings]
>[<https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&business=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick>Donations
>and Support]
>
>----------
><http://www.houseoffusion.com/banners/view.cfm?bannerid=36>
>[]
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

