12

Similar to the situation described in this post regarding Solr, we recently had an issue in which our connection attempts to the xDB Cloud 2.0 service were adding hundreds of megabytes of 504 errors to the logs, crippling the site with timeout errors all over the place and effectively taking the site down until an app pool recycle was manually performed.

I am currently discussing the issue with Sitecore support, in order to ensure that nothing on our end caused this, but this seems highly unlikely since the issue occurred on both CD servers at the same time. In either case, I would like to know if there is a way to ensure that the site remains stable in the event of xDB timeout errors.

At this point, my only real guess at how this could be done is to control the amount of time between connection attempts. Does anyone know if this could be done or any other (perhaps better) ways of doing this?


Version info: Sitecore 8.1u2, xDB Cloud 2.0

4
  • If there are connectivity issues during startup, Sitecore degrades gracefully - at least in 8.0 it did. I guess Sitecore will continue to try to setup sessions though if "xDB mode" is active.
    – sestocker
    Commented Dec 6, 2016 at 21:08
  • The 8.1u2 site did handle this "gracefully" in that server errors did not display to end users, however the CDs performance degraded, then degraded some more, then a little more, and then .... until it ultimately resulted in site-wide timeout errors, effectively bringing the site down for end-users. When I say "gracefully" what I mean is that the site doesn't go down. There should be a way for me to control the time between re-connection attempts to xDB if a (perhaps threshold number of) request(s) fail. Commented Dec 6, 2016 at 21:24
  • The recommendation for production is to have 2.5 mongodb servers: two full capacity for failover and a low capacity to act as the arbiter. doc.sitecore.net/sitecore_experience_platform/… docs.mongodb.org/manual/replication Commented Feb 22, 2017 at 19:23
  • Very true @IsNull, but this post is refers to xDB Cloud 2.0, which is a package offered and managed by Sitecore in which Sitecore hosts (through external providers) a Reporting instance, a Processing instance, a Collections DB (Mongo), an Aggregation DB (SQL) and the analytics index (Azure search) - all for reduced licensing costs. The caveat is that the client and the development team have minimal control over the instances. Regardless, we did not have trouble connecting to Mongo but rather to the xDB service, which is the Reporting instance. xDB Cloud Docs: doc.sitecore.net/xdb_cloud Commented Feb 22, 2017 at 19:31

1 Answer 1

5

Just recently had a conversation about the same issue on a Sitecore 8.0-4 instance of xDB Cloud 1.0. The client was having issues with latency when mongoDB became unavailable and I was confused on why as the only time their instance was calling into mongoDB was on initial login. Login seemed to be fine but the application was very slow when mongoDb was unavailable. Since the only time the application should be communicating with mongoDB was on initial Contact Identification and on Session End, my assumption was performance shouldn't impact current session tracking. After speaking with Sitecore, they have released a KB Article explaining potential causes to the Content Delivery Server if mongoDB becomes unavailable.

Some recommendations are

  • Update mongoDB to 3.0 and use WiredTiger storage engine for performance improvements. "May want to verify this with Sitecore but I think xDB Cloud 2.0 is configured with this architecture.
  • Decrease the mongoDB Connection Timeout's, ex. connectTimeoutMS=2000&socketTimeoutMS=2000. To make this change for xDB Cloud 1.0, you need the following patch: Sitecore.Support.155426. For xDB Cloud 2.0 you shouldn't need the patch, just change the connection string to something other than default.

This is the link to the article for more indepth explaination of how Sitecore communicates with MongoDB: https://kb.sitecore.net/articles/930657

2
  • Can you provide some exceprts from the article about some of the Scenarios in which this issue occurs, as well (in case the link is broken in the future), including relevant patch numbers, if any? Commented Apr 21, 2017 at 19:51
  • I updated the answer with recommendations. Commented Apr 21, 2017 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.