weblogic 12 套接字泄露处理方法

现场weblogic报<DynamicListenThread[Default]> <<WLS Kernel>> <> <> <1417715701920> <BEA-002631> <Max threshold reached for open sockets [total open sockets: 5,000, allowed max: 5,000]. No more connections allowed.>

处理方法有两种:

BEA-002631 - Reached Maximum Open Sockets / Leak of Sockets in CLOSE_WAIT state (文档 ID 1673969.1)

转到底部

In this Document

Symptoms
  Cause
  Solution
  References

APPLIES TO:

Oracle WebLogic Server - Version 12.1.2.0.0 and later

Information in this document applies to any platform.

SYMPTOMS

In a lightly loaded staging environment, the maximum open sockets was reached as below.

06-Dec-2013 20:03:03 o‘clock GMT Warning Server rds09470app145 rdms1-restgp2b DynamicListenThread[Default] WLS Kernel 1386360183611 BEA-002631 Max threshold reached for open sockets [total open sockets: 1,000, allowed max: 1,000]. No more connections allowed.

In WLS 11g and 8.1 domains running on the same hardware with 1000 sockets, this issue was not observed.

CAUSE

Using NIOSocketMuxer (the default socket muxer in 12.1.2), the socket closure depends on the finalizer mechanism. If the finalizer thread does not kick in (e.g., no GC), the socket closure will not happen and you will reach the number of open sockets configured.

A second issue was that disabling the MAX-OPEN-SOCK-COUNT setting requires a reboot, although the console says that a reboot is unnecessary.

A third issue was that although the first issue is solved, a number of sockets in CLOSE_WAIT were still found, leading to the server ceasing to process requests.

Observations:

  1. For the first issue, when using JFR (that regularly kicks GC), the issue does not happen. The source code analysis confirms this.
  2. For the second issue, this is shown in console and while reproducing the first issue.
  3. For the third issue, one could watch, only on the customer instances, this phenomenon, although first issue was fixed! The same symptom occurred (leak of CLOSE_WAIT sockets) but in this case, stopping JFR does not make the issue disappear.

SOLUTION

Solution retained by this customer is to drop MAX-OPEN-SOCK-COUNT and to apply the known workaround against the deadlock. The other solution is to install the following patches on WLS 12.1.2:

REFERENCES

BUG:18396023 - NIO: MANY NATIVE SOCKETS IN CLOSE_WAIT, NO JAVA SOCKET LEAKS

BUG:18289179 - SETTING MAX-OPEN-SOCK-COUNT REQUIRES ENTITY REBOOT

时间: 2024-08-08 13:50:57

weblogic 12 套接字泄露处理方法的相关文章

window 7 &amp; 2008R2 多核cpu套接字泄露补丁

http://hotfixv4.microsoft.com/Windows%207/Windows%20Server2008%20R2%20SP1/sp2/Fix373886/7600/free/435093_intl_x64_zip.exe 在处理下面问题时,会起到一定作用.

Unix网络编程学习笔记之第7章 套接字选项

一.获取/设置套接字选项的方法 一个套接字描述符相关联的套接字选项很多.获取/设置套接字选项的方法: 1.  getsockopt和setsockopt函数 2. fcntl函数 3. ioctl函数 二. getsockopt和setsockopt函数 int getsockopt(int sockfd, int level, int optname, void* optval, socklen_t* optlen); int setsockopt(int sockfd, int level,

js-权威指南-Web套接字

HTTP是一种无状态的协议,,由客户端请求和服务端响应组成.HTTP实际上是比较特殊的网络协议. 大多数基于因特网的网络连接通常包含长连接和基于TCP套接字的双向消息交换.让不信任的客户端脚本访问底层的TCP套接字是不安全的,但是WebSocket API定义了一种安全方案:它允许客户端代码在客户端和支持WebSocket协议的服务器端创建双向的套接字类型的连接.这让某些网络操作会变得更加简单. WebSocket API通过WebSocket()构造函数创建一个套接字: var socket

Linux网络编程:原始套接字的魔力【上】

基于原始套接字编程 在开发面向连接的TCP和面向无连接的UDP程序时,我们所关心的核心问题在于数据收发层面,数据的传输特性由TCP或UDP来保证: 也就是说,对于TCP或UDP的程序开发,焦点在Data字段,我们没法直接对TCP或UDP头部字段进行赤裸裸的修改,当然还有IP头.换句话说,我们对它们头部操作的空间非常受限,只能使用它们已经开放给我们的诸如源.目的IP,源.目的端口等等. 今天我们讨论一下原始套接字的程序开发,用它作为入门协议栈的进阶跳板太合适不过了.OK闲话不多说,进入正题. 原始

网络编程(二):套接字Socket

socket是基于C/S架构的,也就是说进行socket网络编程,通常需要编写两个py文件,一个服务端,一个客户端. 首先,导入Python中的socket模块: import socket 其通信逻辑如下图所示: 这张图片是整个socket编程的基础,必须牢牢记住. 通过导入模块import socket后用socket.socket()创建套接字,格式如下: sk = socket.socket([family[, type[, proto]]]) 参数说明: family: 套接字家族,可

19、网络编程 (Socket套接字编程)

网络模型 *A:网络模型 TCP/IP协议中的四层分别是应用层.传输层.网络层和链路层,每层分别负责不同的通信功能,接下来针对这四层进行详细地讲解. 链路层:链路层是用于定义物理传输通道,通常是对某些网络连接设备的驱动协议,例如针对光纤.网线提供的驱动. 网络层:网络层是整个TCP/IP协议的核心,它主要用于将传输的数据进行分组,将分组数据发送到目标计算机或者网络. 传输层:主要使网络程序进行通信,在进行网络通信时,可以采用TCP协议,也可以采用UDP协议. 应用层:主要负责应用程序的协议,例如

基于TCP协议的socket套接字编程

基于TCP协议的socket套接字编程 一.什么是Socket Socket是应用层与TCP/IP协议族通信的中间软件抽象层,它是一组接口.在设计模式中,Socket其实就是一个门面模式,它把复杂的TCP/IP协议族隐藏在Socket接口后面,对用户来说,一组简单的接口就是全部,让Socket去组织数据,以符合指定的协议. 所以,我们无需深入理解tcp/udp协议,socket已经为我们封装好了,我们只需要遵循socket的规定去编程,写出的程序自然就是遵循tcp/udp标准的. [ 注意:也有

WSASocket()创建套接字不成功解决方法

这几天我在写一个模仿windows自带的ping程序,可是套接字总是创建不成功,在网上找了一些资料最后总算把问题解决了,现在总结一下. 解决方法:以管理员运行VS就行了我的是vs2013,vs2010也一样. /*Winsock 初始化*/ if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { //如果初始化不成功则报错,GetLastError()返回错误信息 printf("WSAStartup() failed:%d]\n",

2017.07.12 Python网络编程之使用多路复用套接字I/O

1.在本章开始之前,需要先理解同步与异步,阻塞与非阻塞的区别: "阻塞"与"非阻塞"与"同步"与"异步"不能简单的从字面理解,提供一个从分布式系统角度的回答.1.同步与异步同步和异步关注的是消息通信机制 (synchronous communication/ asynchronous communication)所谓同步,就是在发出一个*调用*时,在没有得到结果之前,该*调用*就不返回.但是一旦调用返回,就得到返回值了.换句话