-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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] Redis clients add 1GB/s memory usage through a CLOSE_WAIT server connection #13496
Comments
do you mean the rust client consume more than 1gb even it disconnected? |
Yes! It tries to connect to the redis over the port that is still in CLOSE_WAIT state. |
the reason should be that the rs client does not realize that the Reids in docker has been shut down , causing the connection to be in CLOSE_WAIT state. |
@jaques-sam any news? if no i'll mark it as close. |
Uh, the remaining issue is imho a major bug and needs solving... How come an application can reserve such a tremendous amount of memory (1GB/s)?! This should be tackled. Closing this will simply hide the issue. |
@jaques-sam regarding this, you can make a issue for help in https://github.com/redis-rs/redis-rs. |
Mmm, it's also happening with redis-cli, and probably with other redis clients as well. |
@jaques-sam can you give the reproduce steps by using redis-cli? |
The production steps are as said in the first message:
|
@jaques-sam where do you see memory growing at 1gb per second? from 'ps'? please give the info. |
I couldn't reproduce it myself anymore, so start trying it out again.... This is the reason why the port is in CLOSE_WAIT state. This is even the case when the docker is still running. Sorry for the confusion. It's strange I don't see MEM% being high, only my main memory is getting full: After couple of seconds: As you can see, |
@jaques-sam please try |
ps aux | rg redis
sam 804823 0.0 0.0 20616 4148 pts/2 S 11:47 0:00 redis-cli
gdb -batch -ex "bt" -p 804823
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.fedoraproject.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f8dbd72c5dd in recv () from /lib64/libc.so.6
#0 0x00007f8dbd72c5dd in recv () from /lib64/libc.so.6
#1 0x0000556a235c4b6d in redisNetRead ()
#2 0x0000556a235cbd1c in redisBufferRead ()
#3 0x0000556a235ccc21 in redisGetReply ()
#4 0x0000556a235ccde4 in redisCommand ()
#5 0x0000556a235a8e90 in cliInitHelp.lto_priv.0 ()
#6 0x0000556a235ae433 in repl.lto_priv ()
#7 0x0000556a2359de79 in main ()
[Inferior 1 (process 804823) detached] Memory is not increasing here: ps aux | rg redis
sam 804823 0.0 0.0 20616 4252 pts/2 S 11:50 0:00 redis-cli
ps aux | rg redis
sam 804823 0.0 0.0 20616 4252 pts/2 S 11:50 0:00 redis-cli
ps aux | rg redis
sam 804823 0.0 0.0 20616 4252 pts/2 S 11:51 0:00 redis-cli
ps aux | rg redis
sam 804823 0.0 0.0 20616 4252 pts/2 S 11:51 0:00 redis-cli
ps aux | rg redis
sam 804823 0.0 0.0 20616 4252 pts/2 S 11:51 0:00 redis-cli |
from your ouput we can see than |
As said:
Because redis-cli is not increasing in memory in (h)top/ps, isn't that because memory is consumed in Kernel space? |
@jaques-sam no, i guess it's caused by vscode. |
Describe the bug
I have 1 GB of memory usage extra per second (!) when trying to connect with redis client to a redis-server which was started in a docker which is not running anymore.
To reproduce
redis-server &
from a docker which has forwarded the default redis port or has access via the docker run argument--host
Expected behavior
CLI clients should definitely not require an infinite amount of memory.
Furthermore, I expect it to fail or timeout if it cannot connect to a server on the redis port.
Additional information
I've used the following clients:
The text was updated successfully, but these errors were encountered: