Redis-server - FATAL CONFIG FILE ERROR - Filepath Space problem

I am trying to start the redis-server that was installed in windows PC as deamonize service. I configured the redis.conf file to accept the pidfile and logfile path as follows: pidfile D:\HMS Build\redis\bin\redis.pid .... logfile D:\HMS Build\logs\redis.log While i was trying to start the server, i am getting the following error message. *** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 52 >>> 'logfile D:\HMS Build\logs\redis.log' Can't open the log file: In

Redis master runs several more commands than the Redis slave

We are obtaining a very interesting graph in our Redis architecture. Green: master Blue: slave Looks like the master Redis is executing 35% more commands than the slave Redis. It is not always the same distance. Here is part of the log of the active redis server: [26911] 14 Feb 13:28:44 - DB 0: 2399 keys (417 volatile) in 16384 slots HT. [26911] 14 Feb 13:28:44 - DB 1: 498 keys (498 volatile) in 1024 slots HT. [26911] 14 Feb 13:28:44 - DB 2: 1 keys (0 volatile) in 4 slots HT. [26911] 14

How do I use ServiceStack.Redis message queue to send email notifications?

I am digging into the messaging capabilities of the ServiceStack.Redis client and trying to make sense of things. My initial usage would be to queue up notification messages and then process those messages in a windows service that sends the emails out. Can I have multiple instances (on different machines) of RedisMqServer running to process the messages? (From what I am seeing, it looks like that would be fine) If the redis server dies, when it starts back up will the RedisMqServer pickup whe

(empty list or set) from redis-cli when run from bash

I have 3 dummy keys stored in my local redis server. redis 127.0.0.1:6379> keys * 1) "key2" 2) "key3" 3) "key1" When I try to fetch the same results from bash it returns "(empty list or set)" . Why? $ redis-cli keys * (empty list or set)

Redis : Is there a limit to the number of keys that i can store?

First the context, im trying to use Redis as an in-memory store backed with persistence. I need to store large number of objects (millions) in a Redis Hash. At the same time, i don't want my redis instance to consume too much memory. So i've set the maxmemory property in redis.conf to 100mb. I've set maxmemory-policy as allkeys-random The persistece mode is AOF and fysnc is every second. Now the issue iam facing is, every time i try to store more than two hundred thousand ojects in the hash,

Redis G-WAN and Key-Value store in C

Is it advisable and possible to use an expiration time on the data stored via the Key-Value Store in G-WAN, or is it better and more stable to use a solution like Redis (especially if that involves storing a large number of values) ?

How to get all keys that match a specific pattern from a hash in redis?

I would like to get all keys, with its values, from a hash, where the keys match a specific pattern. I use redis with the c# library ServiceStack.Redis. I have found the command Keys with a pattern: http://redis.io/commands/keys if it is simple string_key -- string_val but nothing if its within a hash. There is List<string> GetValuesFromHash(string hashId, params string[] keys); but it only works if the keys perfectyl match the keys in redis. A key:* would return null e.g. myHash = k

Redis keys function for match with multiple pattern

How i can find keys with multiple match pattern, for example i've keys with foo:*, event:*, poi:* and article:* patterns. how i find keys with redis keys function for match with foo:* or poi:* pattern, its like find all keys with preffix foo:* or poi:*

Redis performance on a multi core CPU

I am looking around redis to provide me an intermediate cache storage with a lot of computation around set operations like intersection and union. I have looked at the redis website, and found that the redis is not designed for a multi-core CPU. My question is, Why is it so ? Also, if yes, how can we make 100% utilization of CPU resources with redis on a multi core CPU's.

Redis difference between del() and flushAll() of jedis

I am new to jedis. I am not able to distinguish del() and flushAll(). Does del() deletes the keys from cache or from database. Kindly provide some details. Please note, I did try to search for an answer on the web, but could't fine my answer. Thank you.

Redis how to store associative array? Set or Hash or List?

I'm a bit confused with all the available storing options of Redis. I want to do something simple and I don't want to over engineer it. I'm working with phpredis and Redis v2.8.6. I have this simple associative array that I need to store. I also need to be able to retrieve an item by its key and loop over all the items. $a = array( '12345' => array( 'name' => 'Post A', 'val2' => 'blah blah', 'val3' => 'blah blah blah', ), '54321' => array(

Redis can't persist on Centos 7

Here's my situation ; I'm currently building VMs on Amazon and trying to install and run Redis on them. Everything is fine with Ubuntu ; however, I have some issues with Centos 7. The installation is fine, but when I try to run Redis I get this error : *** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 554 'aof-load-truncated yes' Bad directive or wrong number of arguments So, this line is the problem. I saw some people having the same kind of error, it seems to be relate

How to automatically remove an expired key from a set in Redis?

I have, say, 4 keys in a Redis database. The keys have an expiration of 10 seconds from now. I have added the keys to a set. When the keys expire, they are effectively not in the database anymore (get returns null value). However, the keys are still members of the set. The set will continue to exist until the keys are removed from the set, at which point it too effectively is gone from the database. Is it possible to automatically remove a key from the set(s) to which it belongs when the k

Configuring Redis expire algorithm

I would like to user Redis as a remote timers server. What I need is a way to schedule timer from one server, and get a notification when this timer is fired on all other servers. I have already implemented this mechanism using expired keys and keyspace notifications and it works. The problem is that the way the EXPIRE mechanism is configured, when I'll have many timers they might not fire...(http://redis.io/commands/expire) I was wondering if there is a way to change the 25% rule of expiring

Redis Geospatial Commands on Unstable Branch

I am attempting to use the new Redis geospatial features documented here. I understand that these features are slated for inclusion in Redis 3.2 and so are not included in a stable distribution. So, I pulled down the unstable tarball from the official website. I ran make && make test && sudo make install I then fired up redis-cli to see if I could use the GEOADD command and was met with (error) ERR unknown command 'GEOADD' However, if I run help GEOADD, GEOADD key longi

Redis high speed requirement

I have a specific requirement where 50 clients will update some 10K keys. Each client need to INCR on all 10K keys. Since the rate at which each key may get incremented is 1000/sec, I want to share the load across different Redis Servers. And Each client when they do next INCR/GET, they should get latest value that is present in master/slave. I tried one master and one slave, and slave configured with write permission. But if I INCR a key in slave, it is not getting reflected in master. Hence I'

Safely setting keys with StackExchange.Redis while allowing deletes

I am trying to use Redis as a cache that sits in front of an SQL database. At a high level I want to implement these operations: Read value from Redis, if it's not there then generate the value via querying SQL, and push it in to Redis so we don't have to compute that again. Write value to Redis, because we just made some change to our SQL database and we know that we might have already cached it and it's now invalid. Delete value, because we know the value in Redis is now stale, we suspect no

Redis Moving queue data to the head of another queue

I want to empty a queue into another queue. I assumed that RPOPLPUSH would be the tool for me, running it until queue exhaustion. I want to do this in an atomic step, so I thought that a Lua script would be the tool for me. Unfortunately the script I wrote is not working. Instead it looks stuck in an infinite loop and triggers a BUSY error after timeout. This is the code: local x if KEYS[1] == KEYS[2] then return end repeat x = redis.call('rpoplpush', KEYS[1], KEYS[2]) until not x An

How many redis instances should be run on a machine in a redis cluster

Hola Redis Universe!! We are planning to have the following configuration of redis cluster. A redis cluster comprising of 5 nodes. Each node to have 8 cores, and 64 GB RAM, and 100 GB SSD drive. One slave per master instance. Only RDB persistence(no AOF) after 15 mins on all instances. We have expecting to have a large no of reads/writes per sec, a figure in excess of 20k+. On each node, we are planning to have n masters and n slaves(of other nodes), Considering the singlethreaded nature

Copying all keys in Redis database using MIGRATE

Is it possible to copy all keys from one Redis instance to another remote instance using MIGRATE? I've tried COPY, REPLACE and KEYS without any luck. Each time I get a NOKEY response. If I use any of the MIGRATE commands with a single key it works. Examples: MIGRATE my.redis 6379 "*" 0 5000 REPLACE // NOKEY MIGRATE my.redis 6379 "*" 0 5000 COPY // NOKEY MIGRATE my.redis 6379 "" 0 5000 KEYS * // NOKEY MIGRATE my.redis 6379 "" 0 5000 KEYS test // OK

Elasticsearch Logstash - prevent to loading logdata

I have log data from tomcat server(logback), and would like to analysis it. So, this is my thought. logback log data -> logstash -> elasticsearch -> request elastic query. From some other architecture, there is redis in front of logback, becuase logback has no buffer. If I would like to do this in real time, is redis requeried? Or no need it because all data is already stored in elastic? than why are they using redis for it?

Redis Cache With Data Sources, Users, and Queries

I am starting to use Redis as a cache and I am not sure of the best structure for my application. The overall structure is below: Some things I need to be able to do are: Flushing everything for a data source (all users and all queries). Flushing everything for a particular user (e.x: I would need to remove user 1 and it's queries from data source 1 and data source 2). Everything listed in the tree is meant to be a part of the key to accessing the results of running the query for the user

StackExchange.Redis - writing to a redis cluster points to local IP address

I have a problem writing to a redis cluster. Having this as configuration: static readonly IEnumerable<EndPoint> Endpoints = new[] { EndPointCollection.TryParse("10.5.2.146:7000"), EndPointCollection.TryParse("10.5.2.146:7001"), EndPointCollection.TryParse("10.5.2.146:7002"), }; public static ConnectionMultiplexer Build() { var opt = new ConfigurationOptions { AllowAdmin = true }; foreach (var endpoint in Endpoints) opt.EndPoints.Add(endpoint); Redis

Redis georadius but with different sorting order

I am using redis to store and fetch interesting info around the user and show it as a feed. Lets say I need to fetch all listings with in a given radius R (WITHDISTance) BUT sorted in a reverse chronological order and NOT by distance (as with redis GEORADIUS command). To be more specific, the most recent listing (with in radius R) should be at the top even though it is the farthest of all. Is it somehow possible to do this with geoset alone ? Else how can I achieve this using some combo of red

Redis what will happen to the data if a crash occurs when using fdatasync() in aof?

i'v been reading redis source code recently, i found that in flushAppendOnlyFile() the writer uses fdatasync to update data to disk. as we know, fdatasync() doesn't write metadata info, and flushAppendOnlyFile() will change the aof file size. so if a crash occurs before system update the metadata, will the newest aof data be lost? the writer wrote below in http://oldblog.antirez.com/post/fsync-different-thread-useless.html I can avoid synching metadata without problems, but if I understand t

redis cross data center replication

I try to use redis for http session data replication. My Use case is as follows: We have 2 indepentent datacenters(RZ and RR) each of them has 4 tomcat servers. I have installed redis cluster with sentinel (One Master, 2 slaves and 3 sentinels)on one dedicated server on each datacenter. Each cluster is working as expected. Now I want to synchrinze data between the 2 Masters nodes (cross-datacenter replication), so if our loadbalancer decide to shwitch from DC RZ(Primary) to DC RR (secondary) s

Redis Error reading from the server: Connection reset by peer

I want use pipe mode insert some data to redis. When I run cat test-TXT.txt |./redis-4.0.1/src/redis-cli -h 10.99.205.240 --pipe I get this error: Error reading from the server: Connection reset by peer This is test-Txt.txt content: enter image description here Redis.conf : protected-mode no bind 10.99.205.240 other configuration used default. I can use logstash insert data to redis.

Redis How can I see which keys have been missed?

I'm seeing a lot of cache misses on our Redis instance and I'm assuming this is due to a programming error where keys are looked up which were never stored. I can run MONITOR to see all commands live, but that is impossible to follow and also doesn't seem to indicate if a key was hit or missed. Does Redis itself provide any means to see which keys have been missed?

Redis Pagination in No-sql database

Does no SQL database's like Redis support pagination feature. Use case : I have whole of customer data in Redis instance.However for my API ,request will be coming with pagination (eg :with paging size 10), now i need to load all of the data(lets say -10000) in my Application(Spring boot) from Redis and then do the pagination and return the relevant records(only 10). However for SQL database's like Oracle it is much easier with functions like Rownum which help to do the pagination at the DB leve

Where to find a thorough list of node_redis commands?

I'm using redis to store the userId as a key and the socketId as the value. What's more important is that the userId doesn't change, but the socketId constantly changes. So I want to edit the socketId value inside redis, but I'm not sure what node_redis command to use. I'm currently just editing by using .set(userId, mostRecentSocketId). In addition, I haven't found a good node_redis API anywhere with a complete list of commands. I briefly looked at the redis-commands package, but it still doe

SUNION for all keys with the same pattern in Redis

I have n keys with the same pattern key:abc:<id> that store unsorted set. I want to do the union for them all, but according to Redis documentation (https://redis.io/commands/sunion) I can only specify separate keys in the command like SUNION key:abc:1 key:abc:2 key:abc:3 I want something like SUNION key:abc:*

Redis : Sorted sets for specific SMEMBERS

im new to Redis and try to display a sorted set for specific values that are part of a sadd. Is there a way to do this in Redis? SADD friends "Sarah" SADD friends "Lisa" SADD friends "Tim" ZADD users 200 "Sarah" ZADD users 133 "Lisa" ZADD users 410 "Peter" ZADD users 280 "Tim" ZADD users 205 "Hans" I want to display a sorted set with score only with friends. 1) "Tim" 2) "280" 3) "Sarah" 4) "200" 5) "Lisa" 6) "133"

Redis Coldfusion 2016 API Manager not coming up after restart

I'm running api manager on linux machine. I did restart and now it's not coming up again. I am keep getting following error related to redis server. I did restart several times but still same error. All Add-on is locally installed in the same machine. Any idea what's going on? [ERROR] 2019-11-10 20:27:07.635 [main] GrootServer - Unable to start Config service. Please refer apimanager-exception.log for more details. com.adobe.amp.spi.ServiceException: Unable to start Config service. Please r

"OOM command not allowed when used memory > 'maxmemory'" for an Amazon ElastiCache Redis

I'm getting "OOM command not allowed when used memory > 'maxmemory'" error from time to time when trying to insert into an Elasticache redis node. I went from a self-managed redis instance (maxmemory = 12Go, maxmemory-policy = allkeys-lru) to an Elasticache redis one (r5.large, i.e. maxmemory = 14 Go, maxmemory-policy = allkeys-lru). However, after the migration of keys I'm getting "OOM command not allowed when used memory > 'maxmemory'" error from time to time that I don't manage to un

Why load factor of hashmap in redis is as large as 5

In algorithm classes and authorized books, load-factor is smaller than 1 as it is with Java the default is 0.75. But in redis source code, the load factor is 5. 54 /* Using dictEnableResize() / dictDisableResize() we make possible to 55 * enable/disable resizing of the hash table as needed. This is very important 56 * for Redis, as we use copy-on-write and don't want to move too much memory 57 * around when there is a child performing saving operations. 58 * 59 * Note that even when dict_c

How to nest a list into a structure in Redis to reduce top level?

I want to maintain some meta data in redis. meta_key = build_key() meta_data = { "user": 12345, "tag": "D12321341234123", } res = redis_sip.hmset(meta_key, meta_data) It works as expected. Now I want to keep a list in this meta_data structure and be able to add element to the list. For example: meta_data = { "user": 12345, "tag": "D12321341234123", "items": [] } But it throws an exception right away: redis.exceptions.DataError: Invalid input of type: 'list'

Redis How to process single update of the resource in given time window

I am receiving multiple location updates from the device for a particular resource Id . These location updates can be received at an interval of second or milliseconds as well . I want to process only one of the update for any particular resource Id in a given time window lets say 10 second . Currently I am reading the last processed request for that resource Id from redis cluster and checking if the time difference is greater than 30 seconds , then only I am processing the request . Issue

What are Redis timeseries module restrictions

I didn't find it in any official document, what is redis timeseries module's restrictions in terms of the following: Max number of labels which can be added? Max size of keys? Max number of keys or time series? Please let me know

How do I create a backup of a remote Redis instance?

I'd like to make a backup of the data in a remote Redis instance. But I do not have SSH access to the server that the Redis instance lives on. (Otherwise, I could copy out the .aof or .rdb-file) How do I create a backup in this case?

How to interpret "evicted_keys" from Redis Info

We are using ElastiCache for Redis, and are confused by its Evictions metric. I'm curious what the unit is on the evicted_keys metric from Redis Info? The ElastiCache docs say it is a count: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html but for our application we have observed the "Evictions" metric (which is derived from evicted_keys) fluctuates up and down, indicating it's not a count. I would expect a count to never decrease, since we cannot &qu

Use Redis to load recent data only in memory

I'm planing to use Redis as a database and cache in an app, but I'm having a hard time to understand something: let's say I have 5 years worth of users data stored in Redis, let's say for example it's around 3GB. Generally I only need the most recent data to be available fast and in real time (for example this week data). In my understanding, Redis will keep all the data in memory with some persistence from time to time, but this seems unnecessary, why keep 5 years worth of data while I only nee

Best way to manage redis data

Just getting started with redis, and I'm having a hard time managing the redis data. Are there any tools that help give a visualization of my applications redis data?

Redis write to master read from slave

We want to use Redis to distribute data to remote servers. There is one master instance in the HQ and many remote slaves in our subsidiaries connected to the master. Our applications are running in our subsidiaries. In 99% of the time there are read-only requests made to the slave instance. But there is also the case of modifying data. Such a request is issued against the master. Is there a way to ensure that the changes made to the master are replicated to the slave before the next read re

Redis SSCAN vs SMEMBERS resources usage for large sets

I have a large redis SET (more than 6M entries), and i need to go through all the entries and make some other redis operations with each (mostly calling a ZCARD in a redis Sorted Set using a key based on the original entry). Which is the most efficient (in terms of resources) way of going through all the entries of the SET? Using SSCAN or doing an SMEMEBERS call.

After RedissonClient.getSet("my-set").size() returns a number, why does the set appear to be empty until next run?

I have a set of strings stored in Redis via Redisson. When I use Redisson to get the set, if I call size() on the set (which returns a positive integer that indicates its size, and thus indicating that there are items in the set), and then (afterward) attempt to get an iterator and read from the set, it now appears to contain zero elements. If I stop my application, and then restart it, and if I skip getting the size of the set, and only get the iterator, then I can iterate through the data.

Will it have any performance issues or is the right approach with REDIS or not?

Is it the right way if I save json in redis by applying JSON.stringifiy(), and on retrieve apply JSON.parse(). Q) Do it has some performance issues while writing and retrieving, consider array of records? Or its not even basically the right approach with redis? Just to stackoverflow, curious to know the best practices with redis.

  1    2   3   4   5   6  ... 下一页 最后一页 共 20 页