开发者

Large numbers of TIME_WAIT socket connections running Redis

开发者 https://www.devze.com 2023-01-21 06:19 出处:网络
We\'re using Redis for monitoring on a high traffic web application. The app is written in cand uses the credis client

We're using Redis for monitoring on a high traffic web application. The app is written in c and uses the credis client library.

We're seeing enormous numbers of TIME_WAIT connections left over from our communications with Redis:

$ netstat -a | grep 6379 | grep TIME_WAIT | wc 开发者_如何学编程-l 15865

Any idea what's going on here?

"

rh = credis_connect(NULL, 6379, 2000);

credis_incr(rh, "hhhh2",NULL);

credis_close(rh);


See SO question #337115 for approaches to this problem.

(I prefer making the client close the connection so the client ends up in the TIME_WAIT state.)

0

精彩评论

暂无评论...
验证码 换一张
取 消