CF Muse Reader Asks:
On our CF 6.1 server, we have a /CFusionMX/runtime/logs/default-err.log file that is over 100MB in size. Is there a good way to knock that down, or is it okay to just delete the thing?
First things first, yes it is fine to delete this file. Make sure you know why it is growing so large - there may be errors you should be concerned about, and this file merits your review. In order to delte the file you will have to stop coldfusion. Upon a restarting Coldfusion will actually recreate the file starting with a nice tidy 1 kilobyte. You might notice that the "event" log actually "rolls over" every 200k. Wouldn't it be nice if the err log did that too? It can...
There are additional parameters that are configurable for the Jrun logs. The default installation only specifies these parameters for the event log. Why? Because of a simple flaw in the Jrun.xml file. Look in the Jrun.xml file (found in cfusionmx/runtime/bin). You will see a section like the following:
Notice that the "FileLogEventHandler" has some extra attributes. One of them is a file name attribute. Which is "hard coded" to be the server name plus "-event.log". Because this group of attributes is specified to only apply to the "-event" log, the attribute "rotationSize" is only ever checked for that file. However, if you change this line:
Since the -err log and -out log now "rollover" there is no need to stop the service. You can clean out the directory by deleting old log files that are no longer open. They will exist with an "_1" or "_2" etc. in the name.
See this Macromedia Technote for more information.
any idea how to change the server-out file yet?
getting 1gb log files :(
DK
thanks
I have default-err.log, which is growing obscenely fast (1MB in a matter of hours), and I also have:
default-error.log
default-error_1.log
default-error_2.log
default-error_3.log
Note "error" instead of "err". Why am I getting both? I want to post my sea of error messages, but that's a bit off-topic.
The only thing more beta than ColdFusion 6.1 is my employer who has cluelessly remained with this piece of garbage for so long.
Um, Flunk, wake up. 6.1 came out in 2004. And actually, it was an update to 6.0, which was itself the major upgrade over CF5. Now, a lot of people had issues that that move from 4 or 5 to 6, but 6.1 itself shouldn't seem a problem.
Anyway, if your major job involves overcoming issues with CF, then it seems CF is important enough that you guys ought to have updated to 7 (now almost 3 years old), or 8 (now 4 months old). Are you at least running the free updater to 6.1, from Aug 2004? You may do yourself a favor with that. (Check your Admin to see if your version is at least 6,1,0,83762.)
But what other problems are you facing? Perhaps we can help. (I don't think Mark would mind having that discussion here.)