Drupal 8 + AWS ElastiCache Redis: тайм-аут соединения - PullRequest
2 голосов
/ 08 января 2020

У меня есть настройка AWS ElastiCache Redis в режиме кластера через

https://aws.amazon.com/getting-started/tutorials/setting-up-a-redis-cluster-with-amazon-elasticache/

На Drupal 8 я установил https://www.drupal.org/project/redis

В настройках . php У меня есть код ниже.

// 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. Не уверен, что еще может быть проблема?

...