Re: RE: RE: RE: RE: [ACFUG Discuss] cf 7 bug?
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 -
RE: RE: RE: RE: [ACFUG Discuss] cf 7 bug?
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 -
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 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
RE: RE: RE: [ACFUG Discuss] cf 7 bug?
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 confirm if now those are > indeed picked up. If so, the "save class files" was what was burning you. > > I've seen this before, but don't know for sure what causes it, though > it may be related to a problem I reported back in 2002 at: > > http://cfmxplus.blogspot.com/2002/11/alert-when-cf-will-fail-to-auto.h > tml > > The gist was that I observed problems when you move files from one > server to another, where the CFML file being copied has an older > datetime that the file already compiled class file. There were some > interesting nuances, but it may be that just doing a touch to update
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 confirm if now those are indeed picked up. If so, the "save class files" was what was burning you. I've seen this before, but don't know for sure what causes it, though it may be related to a problem I reported back in 2002 at: http://cfmxplus.blogspot.com/2002/11/alert-when-cf-will-fail-to-auto.html The gist was that I observed problems when you move files from one server to another, where the CFML file being copied has an older datetime that the file already compiled class file. There were some interesting nuances, but it may be that just doing a touch to update the file (on the copied to server) so it's more recent than the class file may solve it. (That was then, in like 6.0. Things may be different now.) There are a few ideas to chew on. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Tuesday, October 17, 2006 12:50 PM To: discussion@acfug.org Subject: Re: RE: [ACFUG Discuss] cf 7 bug? adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject("component","cfide.adminapi.runtime"); // clear cache myObj.clearTrustedCache(); On 10/17/06, Charlie Arehart <[EMAIL PROTECTED]> wrote: > Steven, are you just turning off the trusted cache? Or actually > flushing the template cache as well? Show us the Admin API call you're using. > > /charlie > http://www.carehart.org/blog/ > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven > Ross > Sent: Monday, October 16, 2006 4:41 PM > To: ACFUG ColdFusion Discussion > Subject: [ACFUG Discuss] cf 7 bug? > > Anyone using trusted cache and clearing it with the admin API? If so > do your CFC's still remain? We are trying to find out if this is a bug or not. > > Thanks, > > Steven > > -- > 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 > --
RE: RE: [ACFUG Discuss] cf 7 bug?
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 confirm if now those are indeed picked up. If so, the "save class files" was what was burning you. I've seen this before, but don't know for sure what causes it, though it may be related to a problem I reported back in 2002 at: http://cfmxplus.blogspot.com/2002/11/alert-when-cf-will-fail-to-auto.html The gist was that I observed problems when you move files from one server to another, where the CFML file being copied has an older datetime that the file already compiled class file. There were some interesting nuances, but it may be that just doing a touch to update the file (on the copied to server) so it's more recent than the class file may solve it. (That was then, in like 6.0. Things may be different now.) There are a few ideas to chew on. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Tuesday, October 17, 2006 12:50 PM To: discussion@acfug.org Subject: Re: RE: [ACFUG Discuss] cf 7 bug? adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject("component","cfide.adminapi.runtime"); // clear cache myObj.clearTrustedCache(); On 10/17/06, Charlie Arehart <[EMAIL PROTECTED]> wrote: > Steven, are you just turning off the trusted cache? Or actually > flushing the template cache as well? Show us the Admin API call you're using. > > /charlie > http://www.carehart.org/blog/ > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven > Ross > Sent: Monday, October 16, 2006 4:41 PM > To: ACFUG ColdFusion Discussion > Subject: [ACFUG Discuss] cf 7 bug? > > Anyone using trusted cache and clearing it with the admin API? If so > do your CFC's still remain? We are trying to find out if this is a bug or not. > > Thanks, > > Steven > > -- > 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 > - > > > > > > > - > 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 - - 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 -
Re: RE: [ACFUG Discuss] cf 7 bug?
adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject("component","cfide.adminapi.runtime"); // clear cache myObj.clearTrustedCache(); On 10/17/06, Charlie Arehart <[EMAIL PROTECTED]> wrote: Steven, are you just turning off the trusted cache? Or actually flushing the template cache as well? Show us the Admin API call you're using. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Monday, October 16, 2006 4:41 PM To: ACFUG ColdFusion Discussion Subject: [ACFUG Discuss] cf 7 bug? Anyone using trusted cache and clearing it with the admin API? If so do your CFC's still remain? We are trying to find out if this is a bug or not. Thanks, Steven -- 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 - - 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 -
Re: Re: RE: [ACFUG Discuss] cf 7 bug?
please don't respond to the obvious security concerns in the code below... im aware! On 10/17/06, Steven Ross <[EMAIL PROTECTED]> wrote: adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject("component","cfide.adminapi.runtime"); // clear cache myObj.clearTrustedCache(); On 10/17/06, Charlie Arehart <[EMAIL PROTECTED]> wrote: > Steven, are you just turning off the trusted cache? Or actually flushing the > template cache as well? Show us the Admin API call you're using. > > /charlie > http://www.carehart.org/blog/ > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross > Sent: Monday, October 16, 2006 4:41 PM > To: ACFUG ColdFusion Discussion > Subject: [ACFUG Discuss] cf 7 bug? > > Anyone using trusted cache and clearing it with the admin API? If so do your > CFC's still remain? We are trying to find out if this is a bug or not. > > Thanks, > > Steven > > -- > 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 > - > > > > > > > - > 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 -- 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 -