• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[Coldfusion 2016] : neo-logging.xml updates not taken into account

New Here ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

As I encountered problem with the coldfusion-out.log rotation process I tried to change the value of the parameters maxOutFileBackup and maxOutLogSize in the neo-logging.xml file and restart the coldfusion service.

The new parameters are not systematically taken into account and I could have coldfusion-out.log bigger than the max size defined in the xml file.

Content of the deployed neo-logging.xml:

<wddxPacket version='1.0'><header/><data><array length='2'><array length='0'></array><struct type='coldfusion.server.ConfigMap'><var name='consoleVisible'><boolean value='false'/></var><var name='maxFileSize'><number>7.05032E8</number></var><var name='enableOSLogging'><boolean value='false'/></var><var name='maxOutFileBackup'><number>20.0</number></var><var name='pattern'><string>"%p","%t",%d{"MM/dd/yy","HH:mm:ss"},"%a","%m%x"%n</string></var><var name='maxOutLogSize'><number>20.0</number></var><var name='maxFileBackup'><number>10.0</number></var><var name='consolePattern'><string>%d{MMM d, yyyy HH:mm:ss a} %p [%t] - %m%n</string></var><var name='priority'><string>information</string></var><var name='logDirectory'><string>E:\Logs\ColdFusion</string></var></struct></array></data></wddxPacket>

On my platform, 3 similar servers are deployed and on one of the three (despite of the updated info in neo-logging.xml file) I still have coldfusion-out.log not rotated wih big size (more than 7gb).

Any ideas to try to understand why the behavior is not reliable ?

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2017 Oct 14, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

<var name='maxFileSize'><number>7.05032E8</number></var>

That seems to be the cause.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

This param is for applicative logs and not coldfusion logs (out and error).

On my side, this param limit the size of my <own_application>.log to 705Mb but the current coldfusion-out.log is bigger than this threshold -> more than 1Gb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Was the log already bigger then this after you made the change?

Have you tried archiving the log to see if the new one grows bigger then the limit?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Every night there is a scheduled task which rotates the log, so a new one is created then.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

Every night there is a scheduled task which rotates the log, so a new one is created then.

A scheduled task to rotate the logs? Why would you do that?

ColdFusion rotates the logs itself, automatically. The corresponding settings in neo-logging.xml are:

maxOutFileBackup = maximum number of backups of coldfusion-out.log and of coldfusion-error.log that ColdFusion takes during log rotation

maxFileBackUp = maximum number of backups of the remaining log files that ColdFusion takes during log rotation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

The log rotation handled by CF randomly does not occurs and despite of the neo-logging.xml settings, there is no backup and the outfile continue to increase while the coldfusion service is not restarted

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

The log rotation handled by CF randomly does not occurs and despite of the neo-logging.xml settings, there is no backup and the outfile continue to increase while the coldfusion service is not restarted

This suggests that your whole logging apparatus is broken.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

This param is for applicative logs and not coldfusion logs (out and error).

On my side, this param limit the size of my <own_application>.log to 705Mb but the current coldfusion-out.log is bigger than this threshold -> more than 1Gb

I know what you mean, and in fact thought same. But the difference in size and notation of your setting, <number>7.05032E8</number>, made me wonder. Could a hiccup in one of the settings propagate to the others? Something has definitely gone wrong. 7 GB is a long way away from 20 MB.

What would happen if you were to:

1) modify that setting to <var name='maxFileSize'><number>705000000.0</number></var>

2) save neo-logging.xml

3) archive/rename the oversize log files to a separate directory

4) restart ColdFusion

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

I do not understand:

7.05032E8 = 7.05032 * 10^8 = 705.032Mb

different from 7Gb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

I do not understand:

7.05032E8 = 7.05032 * 10^8 = 705.032Mb

different from 7Gb

You are right: 7.05032E8 bytes = (705032000 / (1024x1024)) MB, which is 672 MB. Say, 700 MB. What I wonder is whether the scientific notation or size of 7.05032E8 causes a problem in the overall settings..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

lionelr99409278  wrote

Any ideas to try to understand why the behavior is not reliable ?

I am still looking into this, but have yet no idea why the logs would outgrow their limits. It's perhaps little comfort for you to know, but this has happened to someone else before. Go to Charlie Arehart's blog, and scroll to the comments in 2016.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

Thanks, I know this blog and tried most of the given workarounds without any success...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2017 Nov 14, 2017

Copy link to clipboard

Copied

Any other suggestions ?

From now, I still do not have any fully working solution for my problem.

I guess i'll have to plan a scheduled task which launch a script to manually stop/start the coldfusion service and rotate the coldfusion-out.log if exceeds a max size i have to define.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2017 Nov 14, 2017

Copy link to clipboard

Copied

Lionel, this is my first seeing this thread (I had a problem where the forums were not emailing me, for months, which is fixed). I have a few more things for you to consider, indeed quite a bit. Strap in folks, we're going for a ride. 🙂 Hopefully somewhere here will be your answer.

 

First, BKBK, thanks for sharing the link to that blog post. While it wasa about CF9 and before, there was that comment from someone with a similar problem to Lionel's, happening on CF11.

 

1) So Lionel, I see that you have the logdirectory (as shown in your xml in the first post here) set to E:\Logs\ColdFusion. So you guys chose to override the default location, which would be the "logs" folder within the CF instance. OK, people do that. But it raises a few possibilities.

 

1.a) First, do you have more than one CF instance? Are they by any chance all pointing to that same single e:\Logs\ColdFusion? That could be trouble (and I've seen it before). You would then have logs from different instances showing up in the same location.

 

1.b) Even if you think you have just one instance, here's a sanity check (those are always worth considering in situations like this, when they are mystifying to all concerned): how about creating a new cfusion folder under that current logs\ColdFusion one, and then change the neo-logging.xml for the "one instance you have" to point to that new subfolder (and restart CF), and see if there's any change in terms of the out file size and rotation.

 

1.c) And even if you really do have only one (and the problem persists after the change above), the next question would be something I alluded to in the blog post: what is the user that is running the service for CF? If it's anything other than "local system", then that user running CF must be given permissions to that log folder. (And it may have permission to edit files but not create or delete them, for instance, though that's a stretch. Anyway, I can't think of any reason the user running CF shouldn't have full permissions to that folder.)

 

Look directly at that e:\logs\coldfusion folder to check...if you check instead e:\logs, it's possible that permissions set THERE did not get propagated down to this next one. I've seen that before.

 

Of course, if you are running CF from the command line, then it's running as whoever you are logged in as, unless you use the runas command (in Windows) to change that. And then the question would be does THAT user have full permissions to that logs folder.

 

If none of that proves to be the issue, there's still more to consider.

 

2) Next, I would ask you the same question I asked that person in the blog comment (who never answered): what update of CF2016 are you on? If not on the latest, which is 5, there's always the possibility that some issue was fixed in some subsequent update. (And yes, an issue that other guy had on 11 could have also been an issue affecting CF2016 users. Adobe releases updates/bug fixes for both the same day.)

 

2.b) And also, can you check your hf-updates folder, to find within it the folder for that latest update applied, and in that folder look at the log for the update, and make sure it shows "0" in its table (near the top) tracking "warnings", "nonfatalerrors", and "fatalerrors"? If you have any, then your update had an error, and THAT could be a contributor to your problem.

 

3) If neither of those is the problem, whereas some would at this point give up, I would want to make 100% sure that the neo-logging.xml file you're looking at is indeed the one that applies to the instance you are asking about. (If you have more than one instance, each will have its own folder with a lib having the various neo*.xml files.)

 

And of course, I'll assume you are confirming that the logs folder (where you see the problem with the logs not rotating) is the sibling of the lib folder where you are looking at the neo-logging.xml file.

 

3.b) So as another sanity check, make a change in the CF admin in the Logging Settings page, changing a setting that you CAN change there, like to increment the "Maximum number of archives" by 1, and then confirm that it shows up in the xml file you are looking at. Of course, you'd want to see if the maxFileBackup value (not to be confused with maxOutFileBackup) has changed.

 

Of course, note that if you had the file open while changing the value in the Admin, then depending on your editor you may need to close and reopen the file to see if it reflects the change.

 

If it does NOT reflect the change, then that is clearly NOT the neo-logging.xml file for the admin you are changing. I know it seems superfluous to consider, but it will take just a minute. (And as you may know, the CF admin shows the instance name in the top left of the admin, at the top of the navbar. The default is cfusion, and if you are on Enterprise, Developer, or Trial, you can create multiple instances, and it would show its name. And there would be a folder in the coldfusion2016 folder for cfusion AND any other instances you created.)

 

I've even seen situations where someone making changes in the CF admin did not reflect in the expected neo-*.xml files, because it turns out that the URL for the admin was NOT even going to the right server (which could even burn someone who DOES have only "one instance"). Still, I realize in your case, your focus has been on the xml file and not seeing proper reflection of changes to the size of the out log.

 

But if that file DOES reflect the change just made in the admin (please don't skip checking that), and you say that file DOES indeed have a maxOutLogSize which IS somehow being ignored, that would indeed be odd.

 

5) But let's start with the first couple of things above: do you have more than one instance? If so, point them each at a log folder of their own. And try it even for the "only one" you may have, just to see what happens. And/or, what are the permissions of the user running the CF in question? Next, tell us the update level you are on, and confirm that there are no errors in the update log for that update. Finally, if none of that is it, then try making a change in the admin logging page and make sure you see it in the neo-logging.xml file.

 

Phew. I know it's a lot. But if this was easy you and others here would have solved it. These are the kind of things I'd walk a client through if they presented this problem to me. I'll look forward to hearing your answers, if you had the patience to stick it out to this point.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 18, 2017 Dec 18, 2017

Copy link to clipboard

Copied

To be efficient, i'll try to sum up as much as possible.

1.a)There is only one CF instance.

1.b)Test could not be done because production environment, but I could delete the files which did not rotate so I guess the permissions are correct

1.c)The CF service could be managed through the service list (as local system) or from a scheduled task (there is a daily service restart) with highest privileges

2. Current update on my platforms is update 2 (even on platforms where the problem do not occur...)

2.b)in the update log file no warning, nonfatalerrors or fatalerrors is displayed

3.b)test done. modifying parameters through the admin page makes the file neo-logging.xml updated

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

LATEST

It would be interesting to hear if anyone who was experiencing this problem back in 2017 (or may still be) has found if doing later CF updates to CF2016 fixed the problem. Back then, the op (Lionel) acknowledged (in the previous last comment here, from Dec 2017) that he was on update 2. Of course, since then there have been in all 16 updates for CF2016, and while I've not heard of this problem since back then, if anyone IS having it, can you confirm if you're on one of the later updates, at least?


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation