Comments (10)
Hello, this report is clear about what it states, but it is not clear how this
is possible and not enough information is provided in order to isolate the
problem.
Please try to include the INFO output first and after the FLUSHALL call, this
would be an important first step in understanding what is happening.
Cheers,
Salvatore
Original comment by [email protected]
on 13 Sep 2011 at 8:36
from redis.
Here are the steps to reproduce the problem.
1. Set maxmemory value to 1.5GB in redis.conf
2. Start redis server
3. Insert data into redis to exceed maxmemory limit using jedis client.
4. When the limit will be reached to 1.5GB, you will start getting exceptions
as "redis.clients.jedis.exceptions.JedisDataException: ERR command not allowed
when used memory > 'maxmemory'"
5. Now open redis client console and type info command to check used memory.It
should be 1.5GB.
6. Now run FLUSHALL command to delete all data from redis. Ensure that data is
deleted by quering your dataset where you inserted records.
7. Now again run info command as well as try to insert data.
8. You should be able to insert data as you have deleted old records to free
memory.
However info command still shows 1.5GB used memory to me and I keep getting the
same memory reached exception.
I have attached info command before and after running flushall when max memory
had reached.
Original comment by [email protected]
on 13 Sep 2011 at 2:37
Attachments:
from redis.
The problem goes only when I restart redis server. After restarting I am able
to insert data and used memory via info command is few MBs as expected.
Attaching info command output after restarting redis server.
Original comment by [email protected]
on 13 Sep 2011 at 2:42
Attachments:
from redis.
There is a client with a large pending reply buffer in the INFO output after
FLUSHALL. Making this client disconnect, or read its replies faster, will be
the first step in trying to fix this condition. We can take a closer look when
this client does not appear to be the cause of the large amount of memory usage.
Original comment by [email protected]
on 13 Sep 2011 at 2:43
from redis.
Issue 525 probably describes what is happening then.
Original comment by [email protected]
on 14 Sep 2011 at 2:10
from redis.
Please let me know if you need any other inputs from me. I have seen the same
issue on 2.2.12 version which I am using on production. Fix for this will be
greatly appreciated. Thanks.
Original comment by [email protected]
on 14 Sep 2011 at 7:06
from redis.
Sonalivk,
Are you using publish/subscribe, or do you know of any client that may be
reading its reply/replies too slow? It is very likely that this client its
output buffer that keeps the memory from being released.
Cheers,
Pieter
Original comment by [email protected]
on 14 Sep 2011 at 7:09
from redis.
No I am not using pub/sub. Also I did not notice any slowness while getting
reply from redis but I will cross check and let you know.
NOTE: I have jedis client who is executing redis commands like hset, hget,
smembers etc. I am using JedisPool and I have set testOnBorrow flag to true so
that it makes ping request to redis server to check if it is alive.
I am not sure if this info would be useful.
Thanks,
Sonali
Original comment by [email protected]
on 14 Sep 2011 at 9:38
from redis.
Hello, as Pieter noted there is a client with long output buffer, so it looks
like a client requested some long reply like LRANGE foo 0 -1, then did not read
the reply back.
Also note that 20k is the *longest* client output buffer list, and you have 600
clients connected.
Probably all the other clients have a long output buffer as well.
So in short it looks like many of the clients are not reading the reply back,
and this objects in queue are using all the memory. Looks like it is not a
redis-server related problem.
Taking the issue open for some more time just to see the outcome, closing later
in the event of no news.
Cheers,
Salvatore
Original comment by [email protected]
on 14 Sep 2011 at 12:44
from redis.
Yes you are correct the issue is due to output buffer. If I close my client
application and ensure that there is no client connected to redis server and
then execute FLUSHALL it cleans up the memory as expected.
I will need to look at jedis application to fix the client code.
Thanks once again for your help.
Original comment by [email protected]
on 15 Sep 2011 at 9:27
from redis.
Related Issues (20)
- BRPOPLPUSH return type is contingent on success HOT 2
- A 8G .aof file lead redis loading so slowly... HOT 3
- The command "config get databases" does not return
- Allow SORT Command to STORE results as sorted set HOT 1
- [FEATURE REQUEST]HMSETX/HSETX HOT 3
- BRPOPLPUSH and a single LPUSH with several items doesn't work well together HOT 2
- Suggestion on either using AOF or Save setting HOT 4
- [FEATURE REQUEST]maxmemory-policy HOT 4
- The issue about the special scenario in redis-2.2.12 HOT 5
- setex silent data loss when using unix time for expiration value HOT 4
- Need Git Tag for 2.2.13 HOT 1
- DBNUM Command HOT 4
- EXPIREAT make test fails
- Hello, antirez. At what time release b-tree version disk store? HOT 1
- make test error CentOS HOT 2
- Could not connect to Redis at 127.0.0.1:6379: Connection refused HOT 1
- configure bind two interface
- minor change (call to id instead of whoami) in install script HOT 1
- /
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.