您的位置:首页 > 运维架构 > Linux

Linux Error: 11: Resource temporarily unavailable

2016-11-09 17:19 381 查看
几日前生产环境遇到一问题,经查证,问题解决,大体过程如下:
一:问题根源:系统参数小于实际需要参数大小

二:基本环境:redhat6.2 +oracle11g rac 

三:分析过程:


现场反馈程序无法正常连接数据库,但登录系统后,监听正常。

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 operationdid not commence because to do so would block the current processand 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 protocoladapter error occurred. Action: Check addresses used for properprotocol specification. Before reporting this error, look at theerror stack and check for lower level transport errors. For furtherdetails,
turn on tracing

TNS-00506: Operation would block Cause: An internal operation didnot commence because to do so would block the current process andthe 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,这也是系统限制而不是数据库内部限制报错的一个原因

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

能满足近期的需要。

四:处理办法:修改系统参数文件限制,两个同时修改,缺一不可

1.vi /etc/security/limits.conf

grid              soft   nproc   8092

grid              hard   nproc   16384

oracle            soft    nproc  8092

oracle            hard    nproc  16384

2.vi /etc/security/limits.d/90-nproc.conf

*         soft   nproc   40960

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

五:验证是否生效

ulimit -a 

在实际操作中,发现有redhat6.3机器需要重启才生效。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐