| title | Object Cache FAQs | |||||
|---|---|---|---|---|---|---|
| description | Review frequently asked questions on Object Caching. | |||||
| permalink | docs/object-cache/faq | |||||
| tags |
|
|||||
| reviewed | 2024-10-25 | |||||
| contenttype |
|
|||||
| innav |
|
|||||
| categories |
|
|||||
| cms |
|
|||||
| audience |
|
|||||
| product |
|
|||||
| integration |
|
|||||
| showtoc | true | |||||
| contributors |
|
This section provides answers to frequently asked Object Cache questions.
| Plan | Cache Memory Limit (in MB) |
|---|---|
| Basic | N/A |
| Performance Small | 256 |
| Performance M, L, XL | 512 |
| Elite | 1024 |
Object Cache follows the maxmemory-policy configuration directive when the specified amount of memory is reached. This directive is defined in the platform redis.conf file.
On Pantheon, the maxmemory policy is allkeys-lru: evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. For more information, refer to the official Redis documentation.
There are two available versions of Redis available for the Object Cache: 2.8 and 6.2. The default version for the platform is 2.8 currently. You can set your site's Redis version.
Your redis.conf file can be retrieved via SFTP similarly to how you can download Redis log files (refer to the example below), or you can review it here:
port xxxxx
timeout 300
loglevel notice
logfile /srv/bindings/xxxxxxxxx/logs/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir /srv/bindings/xxxxxxxxx/data/
requirepass xxxxx
maxclients 1024
maxmemory 964689920
maxmemory-policy allkeys-lru
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
activerehashing yes
Note that the maxmemory value will vary based on plan level.
Our customers have encountered edge cases that may affect Redis performance under load during high traffic periods. There are several patches to the Drupal module available to alleviate the issues:
| Issue Description | Patch Link |
|---|---|
| Always return array to mget to avoid breaking transactions | Patch |
| Allow failing over to database or other backends if Redis is down | Patch |
Yes. There is a redis.log file that is available on the Redis container for each environment.
Follow the steps below to access the Redis container.
-
Go to the Site Dashboard and click the Connection Info button.
-
Copy the SFTP command line string and replace
appserverwithcacheserver. You can see where the log files and configuration reside:
sftp -o Port=2222 live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg@cacheserver.live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg.drush.in
Connected to cacheserver.live.81fd3bea-d11b-401a-85e0-07ca0f4ce7cg.drush.in.
sftp> ls
certs chef.stamp data lock logs metadata.json redis.conf tmp
sftp> ls -la logs/
-rw-r--r-- 1 11455 11455 40674752 Mar 10 19:46 redis.log
sftp>
When you replace the database with one that doesn't match the Object Cache, it can cause database errors on the site, and you may be unable to clear the cache via the Dashboard. To resolve the issue, flush the Object Cache from the command line.