Answer the question
In order to leave comments, you need to log in
Why does the cache stop working?
Hello!
I will describe the situation.
There is a site with news, the news has several relationships, and several count requests, because about 100+ people can visit the site in a few seconds, it was decided to use a cache, namely, redis (predis / predis).
Everything works fine, pages load lightning fast, but, after about an hour of work, the news stops being served through the Cache, and they start requesting directly from the database ( https://i.imgur.com/oQLzAdM.png). If you restart the server, the situation will normalize, but after a while everything will repeat itself, when there are too many requests - the server simply returns 502 ( https://i.imgur.com/9xhyy9t.png)
All requests are wrapped in Cache:: remember(...)..
What could it be?
The radish setting is standard, except that the memory is increased to 32GB.
@update
If you do KEYS * in redis-cli, then more than 100+k entries will start showing up, with names like (blob: https://imgur.com/b6a078f6-9e72-4515-acbc-fe3da87e0d1f)
The content of such keys is almost the same ( https://i.imgur.com/OcSwnHb.png)
Doesn't look like views, what is it?
@update
Ok, those are sessions.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question