Hello All,
Hopefully, I’m posting this ok as this is my first time. I didn’t find any hits in the forums for ElastiCache but I did see some documentation on using an external server.
I’m trying to use the https://docs.expressionengine.com/latest/general/system-configuration-overrides.html#redis documentation to be able to connect to amazon’s elasticache with expression engine. I’m using the Redis driver.
I’ve set the following in the config file
$env_config[‘redis’] = array( ‘host’ => ‘external arn provided by amazon’, ‘password’ => NULL, ‘port’ => 6379, ‘timeout’ => 0 );
However, I don’t think that this is working. Is there any way to find out if it is? I can use the redis-cli to connect to the host provided. When I query the redis-cli using the “keys *” command I only see the test keys that I set up, not anything from ExpressionEngine.
Thanks for any help that you can provide.
Hello, here are some steps you can follow.
Save the config file and restart the ExpressionEngine application if necessary to ensure that the new configuration is loaded.
After restarting, you can test the connection to the ElastiCache Redis server by performing a simple Redis operation within ExpressionEngine. For example, you can use the Redis driver’s get function to retrieve a value from a known key:
php
$value = ee()->redis->get('test_key');</p>
<p>```</p>
<p>Replace <code>'test_key' with the actual key that you have set in Redis. If the connection is successful and the key exists, you should be able to retrieve the value.
Hello, I think you should test Connection from ExpressionEngine. To test if ExpressionEngine is successfully connecting to ElastiCache, you can try enabling Redis caching and check if it works as expected. Add the following configuration settings in your ExpressionEngine config file:
$env_config['cache_driver'] = 'redis';
$env_config['cache_driver_backup'] = 'file';
Save the configuration file and test your ExpressionEngine site. If Redis caching is working correctly, you should see improved performance and the cache being stored in the ElastiCache instance.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.