Developer forum

Forum » Development » Log file setting repetition in GlobalSettings.aspx

Log file setting repetition in GlobalSettings.aspx

Andrew Rushworth
Reply

Hi, 

DW 9.17.7

I want to find out why in the globalsettings.aspx file in the FileRetentionSettings node, we are getting a repeated value (3600+ repetitions..
This file then gets written to at whatever stage (maybe when log cleanups happen or scheduled task).

I'm just wondering if this is normal and how to prevent.

 


Replies

 
Andrew Rushworth
Reply

We also had an issue where this file got corrupt - stopped writing (probably IIS thread abort or timeout writing)

Had to restore an old file:
Unexpected end of file has occurred. The following elements are not closed: Log, System, IncludeSubFolders, FilesRetentionSettings, Logging, Settings, Globalsettings. Line 127, position 14525.

This is a critical file - not sure why its being written to and possibly a temp file shoud be created and only if successful it shhould be swopped out....difficult one to solve.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

That looks pretty odd.

This setting is only written by DW when you edit retention settings in the UI:

How does your setting look like here?

 
Andrew Rushworth
Reply

Yeah, it seems to append a "True" and "30"  every time it runs or something.
not actually sure what the standard file has.

This is what it looked like (I"ve since de-selected the "Delete logs automatically").

Can I remove all those duplicates from the GlobalSettings file ( should there only be one ) and look somethign like this (or should the first True and 30 not be there at all)?:

 

 

 
Andrew Rushworth
Reply

Just to note we had a similar issue with the Translations.xml file and the ItemType_ProductPage file that got corrupted (or interrupted) in the dead of night and had malformed and incomplete data.

The ItemType_ProductPage corruption happened when Integrations was running and the importing file had new custom product columns - it added the columsn to the database, but somewhere along the line this file got corrupt and broek the site.

Then the Translations.xml file also looked like it was interupted while being written to and then had a broken xml format and caused mayhem on the site.

The site is hosted on Azure and I'm not sure if this is causing it or not. 

It would be nice to rather lock critical files so they can't be edited until you need to actually do some work :)

 
Andrew Rushworth
Reply

Anyonehave ideas what is going on here?

Also is it normal that the Translations.xml file be accessible publicly? 

We are getting intermittent long wait times for this file (1-2min) - it could be due to something else happening on the Azure box - but keeps coming up.

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Andrew

No, we have not seen this before - and I have checked our code - we do not even have code that writes to those settings, except backend UI when you change the setting.

Are you running a webapp or an Azure VM?

Translation.xml file is public - but you can remove read access to it from web.config

 
Andrew Rushworth
Reply

Thanks Nicolai.
We are using Azure App Service.

Can I remove all those duplicates from the GlobalSettings file ( should there only be one ) and look something like this (or should the first True and 30 not be there at all - between the <Log> and <EventViewer>)?:

Are there any other files or folders that one should limit in the web.confg? Maybe an example of a standard block list.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Oh yes, there should only be one. And you should remove the rest of them.

You can block everything in /files/system unless you have images or similar used in the frontend.

BR Nicolai

 
Andrew Rushworth
Reply

GlobalSettings.aspx
This issue was resolved by removing the extra True and 30 between <Log> and <EventViewer>.
Not sure how these go there - but one there, the system will add another one every hour or so (still not sure when, but could be when the "clean logs" scheduled task is run), and eventually you'll have a hot mess.
Once removed it doesn't do this.

 

You must be logged in to post in the forum