TNS-12518: TNS:listener could not hand off client connection



几日前生产环境遇到一问题,经查证,问题解决,大体过程如下:
现场反馈程序无法正常连接数据库,但登录系统后,监听正常。
1.alert告警日志无报错信息
2.监听日志信息错误信息如下:
(CONNECT_DATA=(SID=uflowcb1)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=**)(PORT=42961)) * establish * udc * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12536: TNS:operation would block
TNS-12560: TNS:protocol adapter error
TNS-00506: Operation would block
Linux Error: 11: Resource temporarily unavailable
3.错误核对官方文档显示:
ORA-12536: TNS:operation would block Cause: An internal operation did not commence because to do so would block the current process and the user has requested that operations be non-blocking. Action: None needed; this is an information message 

TNS-12560: TNS:protocol adapter error Cause: A generic protocol adapter error occurred. Action: Check addresses used for proper protocol specification. Before reporting this error, look at the error stack and check for lower level transport errors. For further details, turn on tracing

TNS-00506: Operation would block Cause: An internal operation did not commence because to do so would block the current process and the user has requested that operations be non-blocking. Action: None needed; this is an information message.

前三个错误的action均什么也不需要,那么我们就看最后一个linux error:
Linux Error: 11: Resource temporarily unavailable

经查询,是系统连接进程的显示:


[oracle@* ~]$ grep nproc /etc/security/limits.conf 
#        - nproc - max number of processes
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
grid                soft    nproc   2048
grid                hard    nproc   16384
oracle              soft    nproc   2048
oracle              hard    nproc   16384
[oracle@itsm-uflow-db2 ~]$ 

而数据库内部的process是5000,这里的2048明显小于5000,这也是系统限制而不是数据库内部限制报错的一个原因

数据库内部的process5000,这里的2048明显小于5000,这也是系统限制而不是数据库内部限制报错的一个原因,(如果是数据库内部进程限制,那么告警日志将直接报,进程参数不足类似告警)。目前常规用户在2000-2500之间,高峰在4000左右,因此目前数据库5000*2=10000,系统8192*2=16384

能满足近期的需要。



vi /etc/security/limits.conf
grid                soft    nproc   8092
grid                hard    nproc   16384
oracle              soft    nproc   8092
oracle              hard    nproc   16384

保存即可,该限制文件修改后就生效,不需要系统重启。




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24179204/viewspace-2125372/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24179204/viewspace-2125372/

你可能感兴趣的:(TNS-12518: TNS:listener could not hand off client connection)