RIAForge back up (and note on what I screwed up)
Thanks to everyone for pointing out that RIAForge was down today. Where's all the email when the sites aren't down, eh??? ;)
So what was wrong? The site uses a temporary folder to store data extracted from SVN when folks view/download from Subversion via the web site.
Guess what - that temporary folder had not been emptied since the dawn of Man.
Yes - this is something I've blogged about before - watching disk space - and I've just been bitten by it myself!
Comments
Personally, I use IPCheck Server Monitor. It watches what I tell it to (which can include disk space, memory/cpu usage, and check a URL, among *many* other things), and will email me for alerts and escalations. I have the basic alert go to my email, and the escalation go to my cell phone. They even let you provide a backup SMTP server, which is handy for monitoring your primary SMTP server.
# Posted By Shannon Hicks
| 1/30/08 12:08 PM
ColdFusion uses the temp directory for some of its internal features and cleans those things up afterwards, but if your application is creating a file CF will not clean it up. In the case of writeToBrowser(), if you kept the image as a variable and then used writeToBrowser, it should never be written to disk so that's not a concern. If disk space is a concern, it's pretty easy to add a scheduled task that calls a template to clean up older files in the temp directory.
Ray, stop writing so much garbage to the temp directory!
:)
Jason
Ray, stop writing so much garbage to the temp directory!
:)
Jason
# Posted By Jason Delmore
| 1/30/08 12:33 PM
I havent done this myself (yet)... but couldnt you have a monthly schedule that runs a CFC late at night to purge the temp folder? I havent actually used the cfschedule tag, but I have it on my list of things to do in the near future. Curious if that tag would do the job?
Jason:
Maybe I'm confused - but here goes.
I run the following code:
<cfset one = imageNew("", 100, 100, "rgb", "red") />
<cfimage action="writeToBrowser" source="#one#" />
<br />
<cfimage action="writeToBrowser" source="#imageNew("", 100, 100, "rgb", "blue")#">
<br />
View Source:
<img src="/CFFileServlet/_cf_image/_cfimg-4082091803274275737.PNG" alt="" />
<br />
<img src="/CFFileServlet/_cf_image/_cfimg9186042415912217047.PNG" alt="" />
<br />
I check in /CFFileServlet/_cf_image/ and see both files on disk.
What am I missing?
Maybe I'm confused - but here goes.
I run the following code:
<cfset one = imageNew("", 100, 100, "rgb", "red") />
<cfimage action="writeToBrowser" source="#one#" />
<br />
<cfimage action="writeToBrowser" source="#imageNew("", 100, 100, "rgb", "blue")#">
<br />
View Source:
<img src="/CFFileServlet/_cf_image/_cfimg-4082091803274275737.PNG" alt="" />
<br />
<img src="/CFFileServlet/_cf_image/_cfimg9186042415912217047.PNG" alt="" />
<br />
I check in /CFFileServlet/_cf_image/ and see both files on disk.
What am I missing?
# Posted By todd sharp
| 1/30/08 12:40 PM
To be more specific - I check in C:\ColdFusion8\tmpCache\CFFileServlet\_cf_image
# Posted By todd sharp
| 1/30/08 12:41 PM
And 4 minutes later they've magically disappeared....
Question remains though - what did I do wrong/misunderstand?
Question remains though - what did I do wrong/misunderstand?
# Posted By todd sharp
| 1/30/08 12:46 PM
Ah yes, I remember this all too well now. WriteToBrowser needs to write a file because the web browser IMG tag does a separate request for the file. We did do some cool stuff with base64 encoding the image and streaming to the browser early on, but had to ditch that because Internet Explorer doesn't have base64 encoded image support. So yep, the CF File Servlet will write the file out long enough to serve it to the browser and then will clean it up afterwards. Note that creating the image doesn't write to the file system, the image is in memory until you writeToBrowser.
Jason
Jason
# Posted By Jason Delmore
| 1/30/08 1:37 PM
Personally I just log into my server once a month and run ccleaner against it.
I know some people will be saying that I should make it an automatic job, and I agree to the most part, but he is why I do it manually.
Every month it forces me to log in and look things over and do house keeping. I mean, how often do you actually log into your server except when things break. I normally do the ccleaner, the windows updates and also run defraggler against it to clean up the disk. While I'm there I also check the event viewer to see if there are any warnings (you would be surprised how many times I've looked in EV and saw a warning about a disk going bad) or errors that need my attention. This also give me a good chance to check out the utilization of the server to see if everything is kewl and perform some security audits. All and all it takes about an hour our of my time.
Yeah there are tools and software out there that would do a lot of this stuff for you, but let's face it, that stuff is designed to tell when things break, what I'm doing is prevention.
I know some people will be saying that I should make it an automatic job, and I agree to the most part, but he is why I do it manually.
Every month it forces me to log in and look things over and do house keeping. I mean, how often do you actually log into your server except when things break. I normally do the ccleaner, the windows updates and also run defraggler against it to clean up the disk. While I'm there I also check the event viewer to see if there are any warnings (you would be surprised how many times I've looked in EV and saw a warning about a disk going bad) or errors that need my attention. This also give me a good chance to check out the utilization of the server to see if everything is kewl and perform some security audits. All and all it takes about an hour our of my time.
Yeah there are tools and software out there that would do a lot of this stuff for you, but let's face it, that stuff is designed to tell when things break, what I'm doing is prevention.
# Posted By Tony Petruzzi
| 1/30/08 1:44 PM


If you had used the directory returned by getTempDirectory() does CF have any built in purging mechanism for that directory or would you have had the same issue.
Same question applies to the built in directories that CF uses when you use cfimage with writeToBrowser or create a cfpresentation. Does CF purge these dirs for us? How often?