After upgrading some of our solutions to Sitecore 8.1 update-1 we started seeing errors in our log files, such as this:
... ERROR Error in FileWatcher. Internal buffer overflow.
Exception: System.IO.InternalBufferOverflowException
Message: Too many changes at once in directory:path-to-data-dir\Data.
I haven’t figured out exactly why this happens yet, but we do quite a lot of automated file deployments etc, and it seems to occur more often around deployments as well as on local builds on our dev machines. I searched all our machines and the exception had occurred in all our instances that were running update-1, and I didn’t find the error in any instances running other versions of Sitecore.
With very good help from Sitecore support, it turned out it could be solved by moving the license file. As suggested, we just created a license folder in the Data dir and moved the license.xml file in there, and then we applied the following License.config patch into App_Config/Include:
<?xml version="1.0" encoding="utf-8" ?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="LicenseFile"> <patch:attribute name="value">$(dataFolder)/license/license.xml</patch:attribute> </setting> </settings> </sitecore> </configuration>
Even if you haven’t seen the exception yet, I suggest you apply this patch if running Sitecore 8.1. It doesn’t do any harm regardless if you’re affected by it or not.
Although I haven’t dug into the Sitecore.Kernel.dll of version 8.1 of Update 1, I suspect there are way too many changes going on within the logs and viewstate subdirectories.
Yes, seeing the same with Update 1. That’s an odd fix (moving license file) for the message, but will try it.
Also seeing a fair number of settings that don’t seem to be read correctly at startup.
Setting blah blah Invalid value: “”
Many are for settings in disabled configs, so it would make sense that the values are empty. But what does not make sense is why Sitecore startup would seem to require them if they are going to be installed OOB disabled.
This is a default install, BTW so puzzling. I saw one go by for the Media.FileSystemWatcher.BufferSize setting, and thought it might be related to that.
Yes the old style monolithic web.config was unwieldy, but I’m afraid SC may have gone overboard the other direction.
Thanks for posting this, applying the fix now as I was seeing this error in my logs.
This was really helpful.
This also fixed it for us as well! Thanks!
I had a similar issue, for some reason moving the license file didn’t clear it up. However, clearing out the temp directory seemed to do the trick.
We are seeing this error also on our CD servers. I just went from an 8.1 install up to update 2… and started seeing these messages. I too am skeptical the license file is involved, but I’m willing to try it out. Just wanted to post something, so I could be notified of updates.
One of my client hit the issue while installing a Coveo for Sitecore package. I added a reference to this post in our own knowledge base: https://developers.coveo.com/display/public/SitecoreV4/ERROR+Error+in+FileWatcher+Internal+buffer+overflow+while+installing+Coveo+for+Sitecore
Thank you!
very helpful tip. moving the license file and clearning temp folder solved my issue. thanks for sharing..
I moved the license as mentioned, and seems that this helped. But I still do not understand why in this situations, the worker process goes in 2 second from nothing to 1.3 GB and 98 CPU. I would like to understand better how sitecore works and if there is a real solution for this.
Hello Sandor, just fixed same issue. As it was our dev enviroment I have truncated [PublishQueue] and [EventQueue] tables. Maybe it will also help to you.
Hi Kabzid, thanks for your post. Actually I realized that with this change (moving the license file) didn’t helped me all the time and I’ve done the same, truncated PublishQueue, EventQueue and History tables. It seems to me that this is a performance issue, and I can reproduce this on DEV and QA environments. I realize that I do not have the recommended hardware setup, as I run several websites on the same machine for testing purpose, maybe sitecore team will improve this issues in next upgrades.
Best regards, Sandor.
It is my impression that Sitecore adds a FileWatcher for the license file but the watcher will also watch other files in the folder and subfolders, so placing the license file in the root of data means that the FileWatcher will trigger whenever a change occur in the data folder – so by moving the license file to the folder you will not get all those (irrelevant) events from the FileWatcher
Pingback: Sitecore Deployment Checklist – Sitecore Sharing