免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 810 | 回复: 0
打印 上一主题 下一主题

Socket CLOSE_WAIT state for a long time (days) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-06-30 00:55 |只看该作者 |倒序浏览
Socket CLOSE_WAIT state for a long time (days)
lucianolnx
Thu, 14 Apr 2005 12:06:06 -0700

Do someone could explain someting about socket that keeps its CLOSE_WAIT
state for a long time (like as 5 days or more) ?

DETAILS ABOUT THE PROGRAM:
We have a process (deamon) that keeps running all the time, and sometimes
uses a connection with a DBMS (Oracle database) to store some data in the
database. But, this DBMS is configured to close idle connetions after 30
minutes.

On the next time that the deamon try to use de DBMS connection, this
conneciton obviously is closed/invalid, and then it use a ODBC API to
re-open the connection, and so on.

After about 2 days we have noted that was around 70 connections on
CLOSE_WAIT state, like following (from "netstat -ano":
    ...
    TCP 10.10.10.228:1039 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1043 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1044 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1045 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1047 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1048 10.10.20.103:1521 CLOSE_WAIT 3412
    TCP 10.10.10.228:1058 10.10.20.103:1521 CLOSE_WAIT 3412
    ...
So, we monitored the next event that would re-open DBMS connection, and then
we monitored the close idle connection event from DBMS. Obvisourly, more 1
connection on CLOSE_WAIT state appeared.

Stopping the process all connecions on CLOSE_WAIT state was released.

Some ideas ?
Whould be it a bug in the program ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP