microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.81k stars 5.37k forks source link

Redis keys are not deleted after key expiry time #411

Closed DeviChinnaraj closed 8 years ago

DeviChinnaraj commented 8 years ago

Hi,

We are using Redis 2.8 for caching data in our application. The keys are created using SET myKey Value NX EX 60. Ideally the keys should expire after 60 seconds and it should be deleted from the Redis master. But the Keys are not getting deleted. The application is hosted in a multi-server environment, Hence after every 60 seconds we will try to create the same key using the command SET myKey Value NX EX 60. The NX parameter will allow us to create key only if it does not exist, since the previously created keys are not deleted after the key expiry time we are unable to create the new keys in the system. This issue happens intermittently.

We are making using of the maxmemory and “allkeys-lru” maxmemory-policy to remove the keys once maxmemory is reached.

Please suggest solution to resolve this issue.

Thanks.

enricogior commented 8 years ago

Hi @Devi-C what exact version of 2.8 are you using? Thank you.

DeviChinnaraj commented 8 years ago

Hi @enricogior we are using v2.8.2101.

Thanks.

enricogior commented 8 years ago

@Devi-C since 2.8.2101 several updates with important fixes have been released, not specific to the problem you described, but we are not actively debugging any issue on 2.8.2101, therefore please upgrade to 2.8.2400 and let us know if the problem still persist with 2.8.2400. Thank you.