1

Closed

Xml map file contention

description

We've experienced a fairly hard-to-replicate-elsewhere issue with the xml map file. The site gets a good deal of traffic and also has a pretty large volume of pages/resources/resource combinations. The application is running on two web heads with shared file storage. Although it should be noted that the server admin couldn't find any correlation between traffic or server load and the symptoms described below.

The error message being thrown is as follows:

"The process cannot access the file '[app_path]\App_Data\ClientDependency[filemapname].xml' because it is being used by another process."

This is on a request to DependencyHandler.axd.

The general symptoms were described by the server admin as follows:
"The problem started to happen after CDF was enabled (edit: read as composite files enabled). There’s a direct correlation between site lock-ups and file sharing errors in event log. When sharing violation occurs, one application pool just stops responding until recycled."

I'll be investigating further and will update with any progress here, but would appreciate any thoughts/feedback.
Closed Apr 16 at 3:38 PM by Shandem
Going to close this issue as there has been no response. The issue should not occur if all servers are named accordingly.

comments

Shandem wrote Jan 19, 2012 at 9:43 AM

This should only happen if the load balancing environment is using a central SAN storage between all of its web nodes and each node has the same machine name. The file map should be saved with the machine name prefixed so this issue is not encountered. See method: GetXmlMapPath of XmlFileMapper.

Would be very strange if both web nodes having the same machine name?

Otherwise, perhaps a quick solution is to disable the persistence of CDF files, this can be done via a config attribute. When this happens, the combined compressed files are not persisted to file, so the xml map shouldn't be written to. This has drawbacks of course regarding performance, however I'm not exactly sure of the performance repercussion, they may not be bad.

irobinson wrote Jan 19, 2012 at 3:09 PM

I'm working on getting a copy of the contents of the app_data/clientdependency folder - I'm guessing they don't have the same machine names, but I guess I shouldn't assume. :)