[Looking for Charlie's main web site?]

CF911: How to control the size of CF's -out.logs

Note: This blog post is from 2010. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
As a CF user or administrator running CF 6-9 on Windows, have you ever wondered how to increase the size of the console logs (-out log files in the [cf]\runtime\logs directory, or [jrun]\logs in Multiserver)? This entry will tell you how. It's quite easy to do, but it's not done using usual log file size control settings in CF's Admin or XML files.

The quick answer is to use either of two approaches: either the jrunsvc.exe in CF's runtime\bin (or [jrun]\bin), or do a manual registry tweak, both of which I show below.

Update for CF10, forward: CF10 and above change to using a new set of xml entries in the neo-logging.xml file, called maxOutLogSize and maxOutFileBackup that should control this (and which should not to be confused with the long-existing maxFileSize and maxFileBackup, both of which correspond to the settings on the CF Admin logging Settings page.) That said, some users had found in the early updates of CF2016 that somehow the xml entries were NOT being honored. It's not clear from them if later updates did fix that problem. I've not heard it as a widely-reported one.

BTW, if you don't know what CF's -out*.log files are about (they're important!), they're technically holding the console output for CF, when it's started as a Windows service. This can be vital information that is NOT logged in the normal [cf]\logs directory or Admin Log Files display. (If you start CF from the command line, then the same info is written to the command line instead and not to the log file.)

(If you're on *nix, pretty much the same info appears instead in the [cf]/logs/cfserver.log. I know some people have wondered about controlling the size of that file. What I discuss here applies only to Windows.)

Background on the sizing of the -out*.log files

[....Continue Reading....]

Need to look at large files? Consider free Universal Viewer

Note: This blog post is from 2010. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you have any reason to look at large files (especially log files) on Windows, don't use NotePad (it doesn't like large files)! Sure, you can perhaps use WordPad, or you may be using a favored editor like TextPad, UltraEdit, NotePad++, and so on. But those are editors: they generally presume you want to change the file.

If you just want to look at a file, there's a great free tool to do it: UniversalViewer.

It can open a 1GB file as fast as a 1kb file (because it only pulls in what it needs to show the screen full of text you're looking at.) And there are times when you may well need to look at some very large files, especially when troubleshooting CF servers, like I do.

And actually, as its name implies, UniversalViwer can view far more than just text files, including images and more.

I've just only ever used it for looking at log files, for which it excels (and yes, you can search within the file, set it to tail files, and more.)

I've been touting the tool for years in classes and presentations, and I was about to mention it in another blog entry, but then I realized I'd not blogged about it on its own. Rather than have the reference lost in another blog entry, here's its moment to shine!

And yes, I do realize there are several other tools that can do this. I list this one and several others in a category of my CF411 list: Generic File View/Log Analysis Tools. (Note that there are some nifty tools in that category there for looking specifically at CSV files, as well as other entire categories for specific kinds of logs, like CF logs, web server logs, windows event logs, etc.)

CF911: Lies, Damned Lies, and CF Request Timeouts...What You May Not Realize

Note: This blog post is from 2010. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
How often have you seen (or seen others complain of getting) a CF page running longer than it's "supposed to" by a timeout you have set. Maybe you've set the CF Admin "request timeout" (first setting on first page of the Admin), or used the cfsetting requesttimeout tag or the timeout attribute on some specific tag if it's available, trying to get the request to "end" in 60 seconds, and yet you see a request running for 3 minutes, 3 hours, or 3 days! How can that happen?

Or same with if you've set the request to timeout using an alerting feature in a CF monitor like CF Enterprise server monitor, FusionReactor, or SeeFusion.

And perhaps you've seen this error from ColdFusion, in your logs or on-screen:

The request has exceeded the allowable time limit Tag: cfoutput

Do you know what this means? It's usually not what you think, and it may appear as I said 3 hours after a request was "supposed to timeout" in 60 seconds. I've even seen experienced CF developers who get thrown by this challenge. It's not new (and for those reading this even in the CF2016 era, it still happens). And it's not so much a "bug" (in either CF or the monitor tools) but just a situation that you need to understand, and there can be some ways to resolve things.

In this entry I'll try to help explain this surprisingly common problem and I hope to correct some equally common misconceptions. I'll even contend that the info in this error message is often useless and indeed misleading (and therefore the feature producing it ought not be relied upon completely, and should perhaps even be turned off for many). More important, again, there may be a way to "really" kill such a long-running request. Along the way, I'll share some things that I've not seen documented elsewhere.

I also share a solution that may work for query processing but it's NOT about a tag attribute but rather a CF Admin setting in the datasource "advanced settings" to set a "query timeout". This was added in CF 9, but many never noticed. If that's your problem and you want to skip to more on that here, feel free. but you may want to come back and read the rest as it is STILL not a perfect solution.

Strap on your seatbelts. We're going for a bit of a ride (if this situation was easy to understood in the length of a tweet, then perhaps everyone would already understand it and not find it challenging!) As always, I welcome feedback.

[....Continue Reading....]

Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting