3
votes

I use AppHarbor as a CI environment to validate my commits. I'm getting an error in AppHarbor because Redis isn't able to write to disk.

Error:

[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

I've enabled disk write on AppHarbor and this is how I start Redis via code:

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

where in my redis.conf I have the DB directory as App_Data

dir ./App_Data

It works as expected locally (RDB saved into App_Data). Anyone see this before or know of a workaround?

Have you tried just using one of the redis add-ons instead? appharbor.com/addonsfriism
No. Because I use AppHarbor as more of a CI, I would like to keep my product operating similarly to how it works outside of AppHarbor.dmarlow
why dont you just disable redis writes when testing ? I dont see benefits in having persistent redis during tests (redis persistency is pretty well tested by redis devs :)Tommaso Barbugli
I read about RDB and AOF and it wasn't clear about how to completely disable it. I tried commenting out the saves: save 900 1 save 300 10 save 60 10000 But that didn't work. Did I miss something?dmarlow