open file 问题

citwgl 2011-04-29 05:47:37
我们有个应用,前一段时间因open file 的问题,导致应用不可用。修改了open file 的数量后,系统未出现不可用的现象。经过长期对该服务器的open file 进行监控,发现很多open file 都是被TCP 占用了,并且长时间不释放该open file 资源。
监控部分记录如下,请高手帮忙分析下为何?:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 6442 bea 174u IPv4 0x30b72405870 0t0 TCP *:64515 (BOUND)
java 6442 bea 175u IPv4 0x306e58ca1d8 0t0 TCP *:37394 (BOUND)
java 6442 bea 176u IPv4 0x310db893870 0t0 TCP *:64516 (BOUND)
java 6442 bea 177u IPv4 0x305d63919d8 0t0 TCP *:64475 (BOUND)
java 6442 bea 178u IPv4 0x30d0e3f8c68 0t0 TCP *:64570 (BOUND)
java 6442 bea 179u IPv4 0x305d6460db8 0t0 TCP *:64517 (BOUND)
java 6442 bea 180u IPv4 0x310db7beab0 0t0 TCP *:64546 (BOUND)
java 6442 bea 181u IPv4 0x305d63a24c0 0t0 TCP *:64484 (BOUND)
java 6442 bea 182u IPv4 0x300e885be40 0t0 TCP *:33190 (BOUND)
java 6442 bea 183u IPv4 0x30d0ea4bce0 0t0 TCP *:64384 (BOUND)
java 6442 bea 184u IPv4 0x305d63907d8 0t0 TCP *:64495 (BOUND)
java 6442 bea 185u IPv4 0x31155bc0640 0t0 TCP *:37590 (BOUND)
java 6442 bea 186u IPv4 0x306e679e1e0 0t0 TCP *:37503 (BOUND)
java 6442 bea 187u IPv4 0x306e44e9cd8 0t0 TCP *:37418 (BOUND)
java 6442 bea 188u IPv4 0x310def3eae0 0t0 TCP *:64496 (BOUND)
java 6442 bea 189u IPv4 0x3006e47b9f0 0t0 TCP *:35783 (BOUND)
java 6442 bea 190u IPv4 0x311d16033d0 0t0 TCP *:37956 (BOUND)
java 6442 bea 191u IPv4 0x310db7a9548 0t0 TCP *:37391 (BOUND)
java 6442 bea 192u IPv4 0x306e38230c8 0t0 TCP *:37708 (BOUND)
java 6442 bea 193u IPv4 0x30d0e3b0c60 0t0 TCP *:37645 (BOUND)
java 6442 bea 194u IPv4 0x31160f47568 0t0 TCP *:34720 (BOUND)
java 6442 bea 195u IPv4 0x300b82abb40 0t0 TCP *:36155 (BOUND)
java 6442 bea 196u IPv4 0x311d00cedc8 0t0 TCP *:37552 (BOUND)
java 6442 bea 197u IPv4 0x311ccdb3e28 0t0 TCP *:37568 (BOUND)
java 6442 bea 198u IPv4 0x306e39f21a8 0t0 TCP *:36159 (BOUND)
java 6442 bea 199u IPv4 0x306e41fde58 0t0 TCP *:37398 (BOUND)
java 6442 bea 200u IPv4 0x3040c426038 0t0 TCP *:36161 (BOUND)
java 6442 bea 201u IPv4 0x305d63c2f70 0t0 TCP *:37806 (BOUND)
java 6442 bea 202u IPv4 0x305d09fbcb0 0t0 TCP *:37392 (BOUND)
...全文
418 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
citwgl 2011-05-09
  • 打赏
  • 举报
回复
谢谢
justkk
justkk 2011-05-03
  • 打赏
  • 举报
回复
看看这篇文章
http://gurkulindia.com/2011/03/20/solaris-netstat-a-reports-c-onnections-in-the-bound-state/
justkk 2011-05-03
  • 打赏
  • 举报
回复
搜了一下"netstat bound"
The BOUND state is reached either by calling bind on a newly created socket or if the socket is an XTI socket, certain transitions after the socket closes.
I have seen it on various RPC based server daemons and also on Apache Tomcat. It is often used by servers that want to have a pool of sockets held in reserve so that the socket creation and binding is avoided, which can save a lot of time. Having some
socket in this state is normal, but there should not be an excessive number. Even then, if the number of such sockets is static, then I wouldn't worry about them.
citwgl 2011-04-29
  • 打赏
  • 举报
回复
源代码我们这里没有,请帮忙分析什么情况才会产生 下面的信息:
java 6442 bea 202u IPv4 0x305d09fbcb0 0t0 TCP *:37392 (BOUND)
steptodream 2011-04-29
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 citwgl 的回复:]

我是想知道原因是什么?而不是通过重启来解决问题。
[/Quote]
要知道原因 只有去查你程序本身的原因
citwgl 2011-04-29
  • 打赏
  • 举报
回复
主要是帮我分析下 监控的TCP 连接都是不正常的连接,而且长时间不释放,能帮忙解释下为何会产生这些无用的TCP 连接?
citwgl 2011-04-29
  • 打赏
  • 举报
回复
我是想知道原因是什么?而不是通过重启来解决问题。
justkk 2011-04-29
  • 打赏
  • 举报
回复
重启进程6442

1,543

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 Solaris
社区管理员
  • Solaris
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧