Questions tagged [servicestack.redis]

ServiceStack.Redis is a simple, high-performance and feature-rich C# Client for Redis with native support and high-level abstractions for serializing POCOs and Complex Types.

225 questions
42
votes
5 answers

Failed to start redis.service: Unit redis-server.service is masked

I Installed Redis Server on ubuntu 16.04. but when I try to start the redis service using $ sudo systemctl start redis I receive message: Failed to start redis.service: Unit redis-server.service is masked. I don't have any idea about this error.
Raza Rafaideen
  • 2,119
  • 1
  • 19
  • 30
38
votes
1 answer

Difference between StackExchange.Redis and ServiceStack.Redis

Someone can explain the difference about ServiceStack.Redis and StackExchange.Redis c# libraries?
Bruno Brito
  • 389
  • 1
  • 4
  • 5
22
votes
3 answers

How to store list element in Redis cache

I have used StackExchange.Redis for c# redis cache. cache.StringSet("Key1", CustomerObject); but I want to store data like cache.StringSet("Key1", ListOfCustomer); so that one key has all Customer List stored and it is easy to …
Neo
  • 15,491
  • 59
  • 215
  • 405
18
votes
2 answers

How can I prevent race conditions using Redis?

I used Only Redis as my DB, and my client is ServiceStack.Redis. The thing is, if two concurrent request need to update one key, then it can be a race condition. For example A: int a = Get key MULTI a = a - 100 Set key a EXEC B: int a =…
Allan Yang
  • 181
  • 1
  • 1
  • 4
18
votes
1 answer

How to set a string with TTL with StackExchange.Redis

I'm looking for a way to do a very simple TTL string in Redis: So how do I do the equivalent of the following in StackExchange.Redis? SETEX lolcat 10 "monorailcat" I found KeyExpire, but that means every key I set needs two calls?
Dirk Boer
  • 8,522
  • 13
  • 63
  • 111
17
votes
1 answer

Can StackExchange.Redis be used to store POCO?

I am trying to evaluate Redis by using two well known C# drivers ServiceStack and StackExchange. Unfortunately I cannot use ServiceStack because it's not free. Now I'm trying StackExchange. Does anybody know whether with StackExchange.Redis I can…
SomeGuyWhoCodes
  • 579
  • 6
  • 19
13
votes
2 answers

Redis distributed increment with locking

I have a requirement for generating an counter which will be send to some api calls. My application is running on multiple node so some how I wanted to generate unique counter. I have tried following code public static long…
Kamran Shahid
  • 3,954
  • 5
  • 48
  • 93
10
votes
1 answer

Redis - Loading Dataset is Memory Sport:

We are using Redis for Windows and ServiceStack as client library. We are getting the following memory issue from the Redis storage. It was able recover immediately but still this issue is causing some unexpected behaviour in the application .
satish
  • 2,425
  • 3
  • 23
  • 40
8
votes
1 answer

How to format ServiceStack Redis connection string

How can I format the below Redis connection string: Connection string: myIP,keepAlive=180,ConnectRetry=30,ConnectTimeout=5000 I started writing a unit test but keep getting a input string was not in correct format error message [TestFixtureSetUp] …
user1526912
  • 15,818
  • 14
  • 57
  • 92
7
votes
2 answers

Redis Client Side Caching for .Net

Redis 6 has introduced a feature supporting Client Side Caching and is described in here: https://redis.io/topics/client-side-caching I tried out the ServiceStack.Redis and StackExchange.Redis clients, but couldn't make either of them handle it. Can…
Radu Pascal
  • 1,275
  • 14
  • 18
7
votes
1 answer

Redis Timeout Expired message on GetClient call

I hate the questions that have "Not Enough Info". So I will try to give detailed information. And in this case it is code. Server: 64 bit of https://github.com/MSOpenTech/redis/tree/2.6/bin/release There are three classes: DbOperationContext.cs:…
Oguz Karadenizli
  • 3,449
  • 6
  • 38
  • 73
6
votes
2 answers

Redis Connections May Not be Closing with c#

I'm connecting to Azure Redis and they show me the number of open connections to my redis server. I've got the following c# code that encloses all my Redis sets and gets. Should this be leaking connections? using (var connectionMultiplexer…
Peter Kellner
  • 14,748
  • 25
  • 102
  • 188
6
votes
1 answer

Lua in Redis from JSON

I have a list of JSON strings stored in Redis that looks something like this: [ { "ID": 25, "DomainID": 23455, "Name": "Stuff", "Value": 23 }, { "ID": 35, "DomainID": 23455, "Name": "Stuff", "Value": 10 } ] The key would be something like…
ChrisS
  • 2,595
  • 3
  • 18
  • 19
5
votes
0 answers

Network issues and Redis PubSub

I am using ServiceStack 5.0.2 and Redis 3.2.100 on Windows. I have got several nodes with active Pub/Sub Subscription and a few Pub's per second. I noticed that if Redis Service restarts while there is no physical network connection (so one of the…
ptarasov
  • 63
  • 4
5
votes
3 answers

How to increase Redis performance when 100% CPU? Sharding? Fastest .Net Client?

Due to massive load increases on our website redis is now struggling with peak load because the redis server instance is reaching 100% CPU (on one of eight cores) resulting in time outs. We've updated our client software to ServiceStack V3 (coming…
1
2 3
14 15