当我开始使用webdis并在redis-cli中执行“客户端列表”命令时,我得到以下输出:
redis 127.0.0.1:6379> client list
addr=127.0.0.1:44848 fd=5 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44847 fd=6 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44850 fd=7 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44851 fd=8 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44852 fd=9 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44853 fd=10 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
ddr=127.0.0.1:44854 fd=11 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44855 fd=12 name= age=13 idle=13 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=NULL
addr=127.0.0.1:44856 fd=13 name= age=2 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client
为什么这么多客户突然连接?在启动webdis之前,执行“客户列表”时只会出现一个客户端。
答案 0 :(得分:1)
Webdis在启动时创建了许多工作者。然后这些工人连接到redis。这些是您在执行client list
时看到的其他客户。您在启动webdis之前看到的单个客户端是您当前正在运行的redis-cli
会话。