Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug/Enhancement] Redis: "Memory limit" issue and Redis "monitoring" #686

Closed
exodus4d opened this issue Sep 15, 2018 · 0 comments
Closed
Assignees
Milestone

Comments

@exodus4d
Copy link
Owner

exodus4d commented Sep 15, 2018

There is a significant problem with installations running "Redis" either as "Cache backend" and/or as "Session handler".

Problem:

If Redis is configured with maxmemory-policy allkeys-lru, (recommended see: wiki Cache configuration), Redis will drop cache keys/data if maxmemory gets reached.
This behavior is nice for temporary cached data e.g. parsed templates, Ajax responses,... but could lead to problems when Session data gets auto-deleted for an online user (assuming you use Redis as Session handler too) and/or when data gets auto-deleted supposed to be cached infinite.

Info:

  • There is no "warning/error" send from Redis if "used memory" exceeds the maxmemory limit.
  • Redis has a INFO command that gives us feedback about the count of evicted keys due to memory limitations. Use this to quick-check if your Redis server needs more RAM assigned:
    $ redis-cli INFO STATS
    

How to fix:

  • If evicted keys > 0 → increase maxmemory.
    n5yn568
  • If used_memory_peak_human > or close to maxmemory_human → increase maxmemory.
    slack-imgs

New Redis monitoring panel on /setup page:

I added a new "info panel" with current Redis stats (only visible if Redis is used as Cache backend):

  • 64MB is the new requirement for Redis installations
  • current used_memory and used_memory_peak data shown
  • maxmemory-policy requirement → "allkeys-lru"
  • evicted_keys count shown → try to keep this at "0"
  • DBSIZE counts all cached keys
    hnzrjd8
@exodus4d exodus4d added this to the v1.4.1 milestone Sep 15, 2018
@exodus4d exodus4d self-assigned this Sep 15, 2018
@exodus4d exodus4d mentioned this issue Sep 17, 2018
exodus4d added a commit that referenced this issue Sep 26, 2018
- decreased memory requirement for _Redis_ (Cache backend) `128M` → `64M`, #686
- fixed broken "nearby" overlay table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant