I just upgrade my lucee redis extension from 1.3.0 to 1.4.0
and after that sometimes I get strange error like:
Error getting a Redis Connection when putting cache key: RDC72477_72477_LANG_
and also "Error when getting all entries" when I use lucee function CacheGetAll
I use docker-commandbox and set the config setting for cache like this:
"sst_redis":{
"class":"ortus.extension.cache.redis.RedisCache",
"storage":"true",
"custom":{
"idleConnections":"5",
"maxConnections":"9999999",
"host": "${REDIS_HOST}",
"port": "${REDIS_PORT}",
"keyprefix":"dc18-lucee-cache",
"useSSL":"false",
"password":"",
"timeout":"10000"
},
"default": "object"
}
lucee 5.3.6.61
docker commandbox 5.0.1
aws redis 5.0.6
That is great . I have published the extension on ForgeBox as well.
Great, thanks
Hi I just notice with extention 1.4.1 sometime I get error when I use function CacheGetAll
attached are the stacktrace
Â
Â
The issue with this method is that it is unpredictable in any situation under traffic. Basically, this functionality tries to get every single entry in Redis. This is time consuming and could even potentially cause memory issues in trying to give you an array of all cache entries.
You can see that the error is a read timeout from the stack trace. This means that when trying to build the array of entries, the connection just timed out. This can be many issues:
Takes to long to get ALL the data from all the keys in the bucket assigned to the cache.
Heavy traffic and concurrency issues can arise due to read-write inconsistencies
can attest to the difficulties of trying to get all cache data, we have seen similar issues with Couchbase and actually any distributed cache.
Why are you using this function? Maybe we can tackle the problem in a another approach.
thanks for the explanation. I use cachegetall because i put flag value in cache with dynamic name. I think you are right cachegetall could be problem on connection, im going to change my code by using another approach.