Pivotal Knowledge Base

Follow

Redis performance issue while using a Redis 1.7 or below tile as a cache

Environment

Redis tiles prior to 1.8

Pivotal Cloud Foundry 

Symptom

Redis has stopped accepting new writes while used as a cache. This is because the Redis instance has hit its "maxmemory" limit and the app startup fails.

Cause 

Redis for Pivotal Cloud Foundry (PCF) prior to 1.8 is not configured to be used as a cache. This is because its maxmemory-policy is set to no-eviction, which means that the data will be kept rather than cleared from the cache.

When users change the config, they see this issue. Users see this error when they are using Redis 1.7 as a Cache.

Resolution 

The best resolution is to upgrade to Redis for PCF 1.8, which has the on-demand service configured as a cache. It has a default configuration of "allkeys-lru." Additionally, app developers can select other types of cache-eviction policies.

Another resolution is to create a script that will periodically set the maxmemory-policy to allkeys-lru instead of no-eviction. This is a non-optimal solution as it requires continually resetting of the policy in a way not intended by the tile, but it will work and is the path chosen by some users. 

Comments

Powered by Zendesk