Re: RE: RE: RE: [ACFUG Discuss] cf 7 bug?

2006-10-17 Thread Steven Ross

Ok I gotcha, thanks Charlie. I'm not sure why this is happening to
them. I can ask about  a SVN issue but, I don't think that is what is
going on.

My original question was concerning code not showing up on an existing
server after they use the admin api to clear the trusted cache. Ie:
they put new code into prod, clear the cache and only the cfm files
are reloaded not the cfc's. A co-worker tested this on his windows box
and therein might lie the problem. This site is running on Solaris in
production. I thought by what you said that the clearing of the
trusted cache will only remove the cfm files and not the cfc's? I will
ask about the class files being saved.

This isn't something they can really fiddle with in production since
the 9 machine cluster is serving some serious traffic.

-Steven


On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote:

Well, I want to be clear: you say they don't want to restart the server, but
I assume you mean when it comes time to push new code. That's not what I was
referring to when I talked about restarting the server. I was referring just
to a one-time turning off of the save class files option. And even then, I
realize that there are good reasons for it to be enabled in production. I
was just proposing it as a work-around for the problem you were hitting.

But then you also mention that your guy is proposing using the precompiled
templates option. That will then require use of the class files.

As for his assertion that someone restarted the server whenever they did a
push, that seems pretty harsh. With the new admin API ability to clear the
template cache, it would seem no longer required. (And since doing that
didn't solve your problem, I'd say that those are different points of
concern.)

In fact, since you're using CF 7, you may want to investigate this useful
article from Adobe on causing uploaded files to auto-trigger a cache flush:

http://www.adobe.com/devnet/coldfusion/articles/cacheclear.html

But is your original point (about a changed CFC not showing up in a request)
related to deployment of code to a new server? If so, then I recommend again
that you consider the point I'd raised (about the possibility that the file
date on the uploaded server is newer than the file date of the file being
uploaded, as can happen if you use source control and roll back to an
earlier version on your dev/staging server.)

Hope that's all helpful.

/charlie
http://www.carehart.org/blog/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross
Sent: Tuesday, October 17, 2006 1:50 PM
To: discussion@acfug.org
Subject: Re: RE: RE: [ACFUG Discuss] cf 7 bug?

Yeah the point was that they didn't want to restart the server. I found this
article regarding how MM (I mean Adobe) handles deployment of new code into
their cluster and it gives a good tip on speeding up some of the initial
compilation:

(sorry dont have the url)

Given both Simon's and Bob's comments, I got curious as to how our web team
manages deployments to the Adobe website. Vijay Shah, who used to work on
the CF engineering team, manages the group here. This is what he had to say:

The Adobe site is run on a cluster of servers, all of which have the trusted
cache switch turned on. Every time a new version of the site is to be
deployed, the servers are brought down one at a time, the new set of
precompiled templates pushed in, and then restarted.

Note that the web team pushes out precompiled templates to the production
servers. This is another technique that you could adopt if you want to save
the one-time cost of compilation in production environments. This is
especially important for servers that function under high loads - when a
server is restarted and brought back into the cluster it will brought under
load very suddenly. The cost of simultaneously having to compile a large
number of different templates due to sudden load could bring a server to its
knees! In case you're wondering how to precompile templates, see the
documentation for cfcompile here.

On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote:
 Ok, yes, that is clearing the cache. (There is also an available API
 call to turn the trusted cache on and off, which would be different.)

 Indeed, the name of this method is a misnomer: it doesn't clear the
 trusted cache but instead just clears the template cache. The
 trusted option simply controls whether CF should look for newly
 updated files before loading them if it already has them in the cache.

 All that said, what's the problem you're experiencing? Is it that you
 change CFCs and reload, but don't see them? That may instead be caused
 by problems in the underlying Java class files. If you want to confirm
 it, turn off the save class files option in the Admin, and restart
 CF (to be safe), then request your file. Now, that alone may cause it
 to pick up the changed files, but you want to go a step further and
 change the CFC again and reload it, and 

Re: RE: RE: RE: RE: [ACFUG Discuss] cf 7 bug?

2006-10-17 Thread Steven Ross

Thanks for the info, I think it is an environment issue... as it is
working as expected on my local box and from another's windows
workstation. I'll check the path variable to see if that can help me
out.

On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote:

You ask:

I thought by what you said that the clearing of the trusted cache
will only remove the cfm files and not the cfc's?

Well, I don't think imply any difference in the handling of CFCs vs CFM
files regarding the trusted cache, but if that's how you read it, no there's
no difference.

That said, though it's certainly true that if the CFCs instances are stored
in shared variable scopes (session, application), then that would explain
them not being picked up.

Here's another possibility: the CFC may be being picked up from somewhere
other than where you expect. Recall that CFCs are called using an order of
searching which (I think) is the local directory, the web root, any mapped
(CF Admin mappings) directories, the customtags directory, and any added
custom tags directories. If it finds one earlier in that search order, that
would keep it seeing the one you may be changing. Just a thought.

Check the path variable returned in the structure when you call
getmetadata() against the CFC instance, to know for sure.

/charlie
http://www.carehart.org/blog/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross
Sent: Tuesday, October 17, 2006 4:23 PM
To: discussion@acfug.org
Subject: Re: RE: RE: RE: [ACFUG Discuss] cf 7 bug?

Ok I gotcha, thanks Charlie. I'm not sure why this is happening to them. I
can ask about  a SVN issue but, I don't think that is what is going on.

My original question was concerning code not showing up on an existing
server after they use the admin api to clear the trusted cache. Ie:
they put new code into prod, clear the cache and only the cfm files are
reloaded not the cfc's. A co-worker tested this on his windows box and
therein might lie the problem. This site is running on Solaris in
production. I thought by what you said that the clearing of the trusted
cache will only remove the cfm files and not the cfc's? I will ask about the
class files being saved.

This isn't something they can really fiddle with in production since the 9
machine cluster is serving some serious traffic.

-Steven



-
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-







--
Steven Ross
web application  interface developer
http://www.zerium.com
[mobile] 404-488-4364
[fax] 928-484-4364


-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform


For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-