Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
CF5 was insanely stable. I remember when they released it, Allaire said something on the lines of yeah we don't really anticipate doing any patches to this, it rocks. And it did. I seem to remember that they brought in extra team members specifically to optimize certain bits of code too. They still ended up putting out a couple of updates (nobody writes perfect code after all), but it still was solid as a rock. -Cameron On Sun, Dec 18, 2011 at 11:21 PM, Russ Michaels r...@michaels.me.uk wrote: funny you should say that, we still have an old win2k/CF5 server going, and we never have any problems with it at all. I do not even remember the last time any customer reported any problems with CF5, it has been going for years and years without a problem. CF was definitely more stable before it moved to Java. -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| 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:349217 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
Not sure what kind of page you're doing, but have you looked at cfflush? That flushes out the request buffer which can be a significant overhead, especially in terms of perceived responsiveness, on long running pages. I don't know for 100% certain but I believe that that would often trigger a garbage collection as well. Cheers, Judah On Fri, Dec 16, 2011 at 12:40 PM, Ryan Duckworth ryanduckworth...@gmail.com wrote: We used a trick in *ColdFusion 8* that does not seem to work in *ColdFusion 9*. Inside of loops in heavy lifting / long running processes ( scheduled pages ), we would use: structDelete( variables, foo ); This would, in theory, remove the pointer to the location in memory and allow for garbage collection. I have tried moving the processing inside of a cffunction and using a similar trick on the local scope. var objOrder = structDelete( local, foo ); structDelete on variables and local do *not work* in *ColdFusion 9*. Another trick, that is less than ideal, and would require re-writing a significant amount of code is to have 2 pages: The 1st page would contain the loop and use cfhttp to call the 2nd page that actually does the processing. This, in theory, would be a solution if ColdFusion 9 only allows Garbage Collection at the *end of each request*. ( I sure hope this isn't true ) Any Ideas? Maybe cfthread? I know that others out there must have encountered this same problem and come up with a solid solution. Please share your tricks. Best, Ryan ~| 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:349208 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
When doing big batch processing, I will often cfthread and then join the thread back at the end of the loop. This means that everything tied to the thread is now able to garbage collected, as the thread has been marked as expired. Mark On Sat, Dec 17, 2011 at 7:40 AM, Ryan Duckworth ryanduckworth...@gmail.comwrote: We used a trick in *ColdFusion 8* that does not seem to work in *ColdFusion 9*. Inside of loops in heavy lifting / long running processes ( scheduled pages ), we would use: structDelete( variables, foo ); This would, in theory, remove the pointer to the location in memory and allow for garbage collection. I have tried moving the processing inside of a cffunction and using a similar trick on the local scope. var objOrder = structDelete( local, foo ); structDelete on variables and local do *not work* in *ColdFusion 9*. Another trick, that is less than ideal, and would require re-writing a significant amount of code is to have 2 pages: The 1st page would contain the loop and use cfhttp to call the 2nd page that actually does the processing. This, in theory, would be a solution if ColdFusion 9 only allows Garbage Collection at the *end of each request*. ( I sure hope this isn't true ) Any Ideas? Maybe cfthread? I know that others out there must have encountered this same problem and come up with a solid solution. Please share your tricks. Best, Ryan ~| 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:349209 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
On Fri, Dec 16, 2011 at 3:40 PM, Ryan Duckworth ryanduckworth...@gmail.comwrote: structDelete on variables and local do *not work* in *ColdFusion 9*. You aren't really giving any symptoms or errors here. What exactly is the problem you are seeing? Out of memory errors? Do you have code to reproduce this problem? -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http://www.facebook.com/cameroncf | twitterhttp://twitter.com/cameronc | google+ https://profiles.google.com/u/0/117829379451708140985 ~| 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:349211 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
Inside of loops in heavy lifting / long running processes ( scheduled pages ), we would use: structDelete( variables, foo ); This would, in theory, remove the pointer to the location in memory and allow for garbage collection. What makes you think that garbage collection was occurring during that time? I have tried moving the processing inside of a cffunction and using a similar trick on the local scope. var objOrder = structDelete( local, foo ); structDelete on variables and local do *not work* in *ColdFusion 9*. If your goal is simply to delete a variable, you can create a structure within the variables scope and delete the contents of that, right? This, in theory, would be a solution if ColdFusion 9 only allows Garbage Collection at the *end of each request*. ( I sure hope this isn't true ) Why are you worrying so much about garbage collection? Have you observed a specific problem related to garbage collection? CF doesn't really control garbage collection directly. That's controlled by the JVM in which CF runs, using the settings of that JVM's configuration file. In addition, you can manually invoke the GC from within your code. But you shouldn't have to do that for a specific CF program - instead, you configure your JVM's settings based on the aggregate of programs you've written, and the problems that you experience under load. Any Ideas? Maybe cfthread? I know that others out there must have encountered this same problem and come up with a solid solution. Please share your tricks. You can certainly handle long-running processes via cfthread or a variety of other approaches. But you haven't really defined a problem here. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| 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:349212 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
I don't know for 100% certain but I believe that that would often trigger a garbage collection as well. I don't know either, but I would be extremely surprised if this was true. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| 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:349213 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
Years ago we moved an App from CF5 to I believe it was CF6 and ran into issues with one of it's scheduled jobs never being able to finish. This job 26 or so LDAP calls that brought down 70k or so records and inserted them into the database and then did some misc other queries after all that. At the time I tried a lot of different approaches to try and just get it working again and ultimately did something like what you are describing. I did actually make it a web service call that was fed I think 50 rows of records to insert at a time. This seemed to at least allow the process to finish running. Now days I use CFTHREAD though to work around these sort of issues and had some pretty decent success going that route. On Fri, Dec 16, 2011 at 2:40 PM, Ryan Duckworth ryanduckworth...@gmail.comwrote: Another trick, that is less than ideal, and would require re-writing a significant amount of code is to have 2 pages: The 1st page would contain the loop and use cfhttp to call the 2nd page that actually does the processing. ~| 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:349214 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion - Long Running Processes - Garbage Collection - structDelete
funny you should say that, we still have an old win2k/CF5 server going, and we never have any problems with it at all. I do not even remember the last time any customer reported any problems with CF5, it has been going for years and years without a problem. CF was definitely more stable before it moved to Java. On Mon, Dec 19, 2011 at 4:11 AM, Aaron Rouse aaron.ro...@gmail.com wrote: Years ago we moved an App from CF5 to I believe it was CF6 and ran into issues with one of it's scheduled jobs never being able to finish. This job 26 or so LDAP calls that brought down 70k or so records and inserted them into the database and then did some misc other queries after all that. At the time I tried a lot of different approaches to try and just get it working again and ultimately did something like what you are describing. I did actually make it a web service call that was fed I think 50 rows of records to insert at a time. This seemed to at least allow the process to finish running. Now days I use CFTHREAD though to work around these sort of issues and had some pretty decent success going that route. On Fri, Dec 16, 2011 at 2:40 PM, Ryan Duckworth ryanduckworth...@gmail.comwrote: Another trick, that is less than ideal, and would require re-writing a significant amount of code is to have 2 pages: The 1st page would contain the loop and use cfhttp to call the 2nd page that actually does the processing. ~| 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:349215 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm