district09/robo-digipolis-drupal8

Disable redis during release (redis_notavailable file)

Jelle-S opened this issue · 3 comments

Disable redis during release (redis_notavailable file)

Why is this needed exactly?

exception 'RedisException' with message 'read error on connection' in    [error]
/home/data/apps/default/releases/1510578821/web/modules/contrib/redis/src/Cache/CacheBase.php:330
Stack trace:
#0
/home/data/apps/default/releases/1510578821/web/modules/contrib/redis/src/Cache/CacheBase.php(330):
Redis->hGet('data:bootstrap:...', 'valid')
#1
/home/data/apps/default/releases/1510578821/web/modules/contrib/redis/src/Cache/CacheBase.php(157):
Drupal\redis\Cache\CacheBase->invalidateMultiple(Array)
#2
/home/data/apps/default/releases/1510578821/web/core/lib/Drupal/Core/Cache/CacheCollector.php(351):
Drupal\redis\Cache\CacheBase->invalidate('state')
#3
/home/data/apps/default/releases/1510578821/web/core/lib/Drupal/Core/Cache/CacheCollector.php(166):
Drupal\Core\Cache\CacheCollector->invalidateCache()
#4
/home/data/apps/default/releases/1510578821/web/core/lib/Drupal/Core/State/State.php(70):
Drupal\Core\Cache\CacheCollector->set('system.maintena...', false)
#5
/home/data/apps/default/releases/1510578821/vendor/drush/drush/commands/core/drupal/update.inc(261):
Drupal\Core\State\State->set('system.maintena...', false)
#6
/home/data/apps/default/releases/1510578821/vendor/drush/drush/commands/core/drupal/update.inc(180):
drush_update_batch(Array)
#7
/home/data/apps/default/releases/1510578821/vendor/drush/drush/commands/core/core.drush.inc(462):
update_main()
#8 [internal function]: drush_core_updatedb()
#9
/home/data/apps/default/releases/1510578821/vendor/drush/drush/includes/command.inc(422):
call_user_func_array('drush_core_upda...', Array)
#10
/home/data/apps/default/releases/1510578821/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#11 [internal function]: drush_command()
#12
/home/data/apps/default/releases/1510578821/vendor/drush/drush/includes/command.inc(199):
call_user_func_array('drush_command', Array)
#13
/home/data/apps/default/releases/1510578821/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#14
/home/data/apps/default/releases/1510578821/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15
/home/data/apps/default/releases/1510578821/vendor/drush/drush/drush.php(12):
drush_main()
#16 {main}
 [Boedah\Drush\DrushStack]  Exit code 1  Time 38.12s
 [error]

Redis didn't really "go down" put there was a temporary issue, which won't happen (normally) with db cache (if the database fails somehow, the entire release fails anyway). I'm guessing redis was struggling because of the many cache clears during updates (many read/write operations). It might be worth looking in to why redis threw an error, but this is how we fixed the error manually (disabled redis in settings.php, did the release, re-enabled and cleared cache)

This is not an option, because the redis cache won't be cleared if we do this.