4

We are using TeamCity for sitecore CI integration. Sometimes we get an issue related to sitecore item sync using TDS. But after some time, when we run deployment script again on server, those issues were automatically resolved. From last few days, Suddenly every build is getting failed with below reason in TeamCity exception.

error TDS0006: Deploy of /sitecore/templates/ header failed. Reason: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

With high memory uses almost 95%+ RAM utilization. and around 50% CPU utilization.

We triggered build multiple times, as we usually do, whenever we are experiencing this issue but this time, result is always same. I tried many things to resolve this issue like..

  1. Initially we thought that there might be too many items in publishing queue and event queue and that might be an issue. The memory utilization is constantly above 90% and performance of the application gone down drastically. Thus we performed following tasks on all databases (core, master and web).

    a. Cleanup EventQueue

    b. Cleanup PublishQueue

    c. Cleanup History

    d. Rebuild Link Database

    e. Rebuild indexes

  2. All these things don’t help us to resolve the actual issue. Then we checked the log file got something unexpected. During deployment, application is getting restarted multiple times and a new log file is generated on each restart. But deployment resumes even after application restart. Sometimes we got information message that cause application restart, sometimes not, in sitecore log files. We could find below error messages during deployment.

        Sitecore shutting down
    
        6456 07:09:03 WARN  Shutdown message: CONFIG change
    
        HostingEnvironment initiated shutdown
    
        Change Notification for critical directories.
    
        bin dir change or directory rename
    

and sometimes below lines in addition to above log.

RROR Error in FileWatcher. Internal buffer overflow.

Exception: System.IO.InternalBufferOverflowException

Message: Too many changes at once in directory:C:\Inetpub\wwwroot\XXX\Data

To resolve these issues, we made few settings change…

· Increase buffer size

· Changed a location of license file

As per the solution suggested by articles.

FileWatcher Error, Internal buffer overflow https://mikael.com/2016/01/sitecore-file-watcher-internal-buffer-overflow-exception/

But still we are not able to deploy our build to qa environment whereas same code is running fine on dev environment.

  • Is your data folder located under the website root? If it is, you should consider moving it out. – Dmytro Shevchenko Jan 10 '18 at 12:35
  • No, data folder is not under website root. – Arvind Gehlot Jan 10 '18 at 13:43
  • Does your build/release perform additional steps? It appears you are pushing other changes (files, powershell scripts running?) that are firing at the same time as the sync. Regardless, you may want to look into Update Packages (generated by TDS), and then use Sitecore Package Deployer (github.com/HedgehogDevelopment/SitecorePackageDeployer) to install on remote servers. It's much quicker than the method you are using. – jrap Jan 10 '18 at 13:59
  • Does your TeamCity instance have multiple agents and do your builds run in parallel? If so it may be that a build is trying to deploy/sync which another build/deploy is already in progress... – jammykam Jan 10 '18 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.