配置Redis以便与AppHarbor一起使用

时间:2013-05-09 23:23:39

标签: redis appharbor

我使用AppHarbor作为CI环境来验证我的提交。我在AppHarbor中收到错误,因为Redis无法写入磁盘。

错误:

[RedisResponseException: 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., sPort: 58823, LastCommand: ]
   ServiceStack.Redis.RedisNativeClient.CreateResponseError(String error) +133
   ServiceStack.Redis.RedisNativeClient.ExpectSuccess() +135
   ServiceStack.Redis.RedisNativeClient.SendExpectSuccess(Byte[][] cmdWithBinaryArgs) +88
   ServiceStack.Redis.RedisNativeClient.SetEx(String key, Int32 expireInSeconds, Byte[] value) +153
   ServiceStack.Redis.RedisClient.SetEntry(String key, String value, TimeSpan expireIn) +62

我在AppHarbor上启用了磁盘写入,这就是我通过代码启动Redis的方法:

var startInfo = new ProcessStartInfo(redisPath, conf);
startInfo.WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory;
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
startInfo.UseShellExecute = false;
var proc = Process.Start(startInfo);

在我的redis.conf中我将DB目录作为App_Data

dir ./App_Data

它在本地按预期工作(RDB保存到App_Data中)。任何人以前都会看到这个或知道一个变通方法吗?

0 个答案:

没有答案