We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I configure ExpressionEngine to use Amazon ElastiCache?

How Do I?

Marco Dulog's avatar
Marco Dulog
1 posts
2 years ago
Marco Dulog's avatar Marco Dulog

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.

       
annacastillo's avatar
annacastillo
1 posts
2 years ago
annacastillo's avatar annacastillo

Hello, here are some steps you can follow.

  1. Save the config file and restart the ExpressionEngine application if necessary to ensure that the new configuration is loaded.

  2. 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.

  1. If the value is returned successfully, it indicates that ExpressionEngine is able to connect to the ElastiCache Redis server and interact with it. However, if you don’t see any data from ExpressionEngine when using the Redis CLI’s keys * command, it suggests that ExpressionEngine might not be using the Redis server for storing its data.
       
jamessmoke's avatar
jamessmoke
2 posts
2 years ago
jamessmoke's avatar jamessmoke

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.