Php Drupal 8+;AWS ElastiCache Redis:连接超时
我已通过在群集模式下设置AWS ElastiCache Redis 在Drupal8上我安装了 在settings.php中,我有以下代码Php Drupal 8+;AWS ElastiCache Redis:连接超时,php,amazon-web-services,redis,drupal-8,Php,Amazon Web Services,Redis,Drupal 8,我已通过在群集模式下设置AWS ElastiCache Redis 在Drupal8上我安装了 在settings.php中,我有以下代码 // To check redis is installed or not. if (phpversion('redis')) { // Redis Settings $settings['redis.connection']['interface'] = 'PhpRedis'; $settings['redis.connection']['
// To check redis is installed or not.
if (phpversion('redis')) {
// Redis Settings
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['redis.connection']['host'] = 'xxxxx.apse1.cache.amazonaws.com'; // Your Redis instance hostname (Configuration endpoint).
$settings['redis.connection']['port'] = '6379';
// Use for all bins otherwise specified.
$settings['cache']['default'] = 'cache.backend.redis';
$settings['cache_prefix'] = 'prod_';
$settings['container_yamls'][] = $app_root . '/modules/contrib/redis/example.services.yml';
$settings['container_yamls'][] = $app_root . '/modules/contrib/redis/redis.services.yml';
}
它给出了下面的错误
RedisException:中的连接超时
/web/modules/contrib/redis/src/Client/PhpRedis.php:28
主机名似乎有问题,但我从AWS输入的是正确的。不确定还会出现什么问题?从测试web服务器的连接开始,例如
nc-v xxxxx.apse1.cache.amazonaws.com 6379
从测试web服务器的连接开始,例如nc-v xxxxx.apse1.cache.amazonaws.com 6379