I have a site that has been running perfectly fine for months, and now, all of a sudden, nothing works. The site is done with MVC 5 and is use MongoDB for storage.
My best guess is that the MongoDB host is messing around, and that's causing the problem, but...
What do I do to avoid this problem in the future? There has to be some setting I can change?
Here's the error and the stack trace:
QueryFailure flag was not master and slaveOk=false (response was { "$err" : "not master and slaveOk=false", "code" : 13435 }).
at MongoDB.Driver.Internal.MongoReplyMessage
1.ReadHeaderFrom(BsonBuffer buffer) at MongoDB.Driver.Internal.MongoReplyMessage
1.ReadFrom(BsonBuffer buffer) at MongoDB.Driver.Internal.MongoConnection.ReceiveMessage[TDocument](BsonBinaryReaderSettings readerSettings, IBsonSerializer serializer, IBsonSerializationOptions serializationOptions) at MongoDB.Driver.Operations.QueryOperation1.GetFirstBatch(IConnectionProvider connectionProvider) at MongoDB.Driver.Operations.QueryOperation
1.Execute(IConnectionProvider connectionProvider) at System.Linq.Buffer1..ctor(IEnumerable
1 source) at System.Linq.OrderedEnumerable1.<GetEnumerator>d__0.MoveNext() at System.Linq.Enumerable.<TakeIterator>d__3a
1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable
1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at ScaleModellingCentral.Web.UI.Controllers.HomeController.Read() at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult
2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)