U4-5126 - config files get cleared out with zero size

Created by Pete Duncanson 23 Jun 2014, 11:28:36 Updated by Shannon Deminick 18 Dec 2014, 03:19:56

Relates to: U4-5336

Relates to: U4-5783

Relates to: U4-6030

Running a v6.1.6 site, over the weekend two of the config files appear to have been cleared out to zero file size. File affected are:

/config/applications.config /config/trees.config

Both files are present but showing zero file size.

Errors shown on the front end are not all that helpful. To duplicate just clear the contents of either file, note the error given is different between the two.

First query is how are they getting cleared? What writes down to those files that might fall over and result in an empty file getting saved?

Secondly some guards should be in place to defend against this and give the user some guidance as to how to fix. Looks like the system just assumes these mission critical files are always going to be there.

Related our.umbraco posts make it look like this is an old issue:



Sebastiaan Janssen 23 Jun 2014, 11:36:34

Was your disk full at all? (re: http://our.umbraco.org/forum/core/general/36945-Backend-not-working)

Joel Hansen 09 Sep 2014, 13:56:37

I just had this happen to a live site today. Suddenly the whole site including the Umbraco backend was unavailable, throwing an Xml error: "root element is missing". The /config/application.config had been wiped.

--There is 25 GB free disk space, so that shouldn't be a problem.--

Umbraco 7.1.4


I have just been told the drive had run out of free disk space, so it seems very likely to be relevant.

Steve Sage 10 Oct 2014, 15:53:16

I have had this issue several times now on a live site after an app pool restart. Currently running v6.2.1 but had the same issue on the site prior to upgrade when it was running v4.11.10. In our case the disk is not full when the trees.config gets wiped. It only happens intermittently, maybe once a month for the last few months.

The website is load balanced across two servers and the website files are on a shared location on a SAN. I wonder whether the SAN could be causing the issue? Could be failing to write the file for some reason or the two servers are trying to write the file at the same time?

Umbraco is set up as per the instructions for load balanced sites so e.g. ~/App_Data/TEMP/* and ~/App_Data/umbraco.config are local to each web server, not stored on the SAN. But everything in the ~/config folder is stored on the SAN.

Paul Sterling 10 Nov 2014, 22:06:50

This also appears to show up if the web process crashes or is otherwise restarted during app startup. Something in the way the trees/applications config files are updated/written on app start seems to be unsafe, in that it can result in an empty file if app start does not successfully complete.

Shannon Deminick 12 Nov 2014, 07:34:26

These config files are now only accessed lazily when they need to be accessed (i.e. when loading the back office), this will improve startup time. The files are now only written to when changes are required, previously they were written to on every startup. So now that they are generally never going to be written to unless a package is installed, they will no longer be cleared out.

Roger Jarl 26 Nov 2014, 07:41:04

This is still an issue for me in Umbraco 6.2.4.

Steve Sage 11 Dec 2014, 11:58:07

Hi Shannon,

Will this be fixed in a future version of v6 or only in v7?

This is a recurring issue for me on a production system running v6.2.1 and it's not likely I'll be able to upgrade it from v6 to v7.


Shannon Deminick 18 Dec 2014, 03:19:56

v6 issue: http://issues.umbraco.org/issue/U4-6030 which will be part of 6.2.5

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.6, 7.1.4, 7.1.8

Due in version: 7.1.9


Story Points: