C# MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk.

關於在使用redis 持久化時 出現的如下錯誤

 

MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.

missf redis已配置爲保存rdb快照,但當前無法在磁盤上持久化。可以修改數據集的命令被禁用。有關錯誤的詳細信息,請檢查redis日誌。

 

錯誤信息:

2019/10/31 9:17:12
捕獲異常堆棧信息MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
   在 ServiceStack.Redis.RedisNativeClient.ExpectSuccess()
   在 ServiceStack.Redis.RedisNativeClient.ExpectSuccessFn()
   在 ServiceStack.Redis.RedisNativeClient.SendReceive[T](Byte[][] cmdWithBinaryArgs, Func`1 fn, Action`1 completePipelineFn, Boolean sendWithoutRead)
   在 ServiceStack.Redis.RedisNativeClient.SendExpectSuccess(Byte[][] cmdWithBinaryArgs)
   在 ServiceStack.Redis.RedisNativeClient.Set(Byte[] key, Byte[] value, Int32 expirySeconds, Int64 expiryMs)
   在 ServiceStack.Redis.RedisClient.<>c__DisplayClass141_0`1.<Set>b__0(RedisClient r)
   在 ServiceStack.Redis.RedisClient.Exec(Action`1 action)
   在 ServiceStack.Redis.RedisClient.Set[T](String key, T value, TimeSpan expiresIn)
   在 mcwords.Controllers.Filter.McFilter.OnActionExecuting(ActionExecutingContext filterContext) 位置 D:\開發中的項目\merchantwords\mcwords\Controllers\Filter\McFilter.cs:行號 117
   在 System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
   在 System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
   在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__0(AsyncCallback asyncCallback, Object asyncState)
   在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   在 System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state)
   在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__0(AsyncCallback asyncCallback, Object asyncState)

 

解決方法如下:修改redis 配置文件中的  stop-writes-on-bgsave-error 設置爲 no 然後重新啓動 redis  即可

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章