Skip to content

Conversation

@shiftedreality
Copy link
Member

@shiftedreality shiftedreality commented Jun 23, 2020

Description

Per Redis (https://docs.redislabs.com/latest/ri/memory-optimizations/reclaim-expired-keys-memory-faster)

You can set up a cron job that runs the scan command after an interval which helps in reclaiming the memory of the expired keys.

A cron job should be created that will use the SCAN command with a COUNT parameter (value 10,000) that will run every 12 hours. Details can be found in the following links:

Fixed Issues (if relevant)

  1. https://jira.corp.magento.com/browse/MCLOUD-6023

Manual testing scenarios

  1. Run ./bin/magento cache:evict from CLI
  2. Observe the non-zero number of evicted keys
  3. Remove logs rm -rf var/log/*
  4. Enable cron process by setting 'cache_evict' => ['enabled' => 1], in app/etc/env.php
  5. Run cron manually bin/magento cron:run
  6. Run cat var/log/system.log | grep "Keys scanned: " and see log entries

Release notes

Added command ./bin/magento cache:evict to force run Redis Sync and evict expired keys

Associated documentation updates

Add link to Magento DevDocs PR or Issue, if needed.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • Pull request introduces user-facing changes and includes meaningful updates for any required release notes and documentation changes
  • All commits are accompanied by meaningful commit messages

@mveeramneni mveeramneni added the Progress: on hold PR/issue status label Jun 23, 2020
@shiftedreality shiftedreality changed the base branch from 1.0 to develop July 13, 2020 15:20
));

$dbKeys = $this->run(
$cacheConfig['backend_options']['server'],
Copy link
Contributor

@oshmyheliuk oshmyheliuk Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you should check if $cacheConfig is an array and contains required keys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

oshmyheliuk
oshmyheliuk previously approved these changes Jul 14, 2020
bbatsche
bbatsche previously approved these changes Jul 14, 2020
@shiftedreality shiftedreality added Progress: testing in progress PR/issue status and removed Progress: review PR/issue status labels Jul 14, 2020
@andriyShevtsov andriyShevtsov self-assigned this Jul 14, 2020
@shiftedreality shiftedreality dismissed stale reviews from bbatsche and oshmyheliuk via ccee8c5 July 15, 2020 16:53
@andriyShevtsov
Copy link
Contributor

QA approved

kandy
kandy previously approved these changes Jul 15, 2020
bbatsche
bbatsche previously approved these changes Jul 15, 2020
@shiftedreality shiftedreality dismissed stale reviews from bbatsche and kandy via 98b2239 July 15, 2020 21:00
bbatsche
bbatsche previously approved these changes Jul 15, 2020
@shiftedreality shiftedreality merged commit 5bca077 into develop Jul 16, 2020
@shiftedreality shiftedreality deleted the MCLOUD-6023 branch July 16, 2020 14:02
@shiftedreality shiftedreality added Progress: approved PR/issue status and removed Progress: testing in progress PR/issue status labels Jul 27, 2020
magento-devops-reposync-svc pushed a commit that referenced this pull request Apr 5, 2024
MCLOUD-12025 Cloud Tools Release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants