环境:winServer2003 64位系统 内存:4G 安装的32位oracle 10g (三年前厂家部署的) 运行着第三方接 口程序
现在业务基本不能停。 业务量越来越大。 自投入使用后基本没出现过大问题!!
问题:自今年起,偶尔数据库会报错:ORA-12518: TNS: 监听程序无法分发客户机,然后数据库就不能用了。
利用PL/SQL develop也不能连接数据库了 ,只能重新启动数据库服务,才能正常使用。
分析:从网上搜到很多可能原因,基本一一排除.
1、关于session和processes数 都是默认的170 和150. 出问题时查看当时无论是会话数还是进程数都未达到阀值都没达到设定值。
2、select name,busy,status,accept,idle from v$dispatcher; busy为0 排除
3、数据库参数:sga 1.7G ; pga:400M
D:oracleproduct10.2.0db_1NETWORKloglistener.log 监听文件>2G 已清空
4、该如何解决?
目前的做法是 降低sga大小 已使oracle有更多的内存建立连接 接口程序执行速度会明显变慢/
没有必要手动去降低sga大小使用sga_target就可以,但是修改内存参数不见得就能解决这个问题。
放便的话可以把dispatchers参数的值和listener.ora的内容贴上来看看吗?如果出来了问题 看一下监听log和告警日志那个时间点有没有报错。
收起12518, 00000, "TNS:listener could not hand off client connection"
// *Cause: The process of handing off a client connection to another process
// failed.
// *Action: Turn on listener tracing and re-execute the operation. Verify
// that the listener and database instance are properly configured for
// direct handoff. If problem persists, call Oracle Support.
// *Comment: The problem can be worked around by configuring dispatcher(s)
// to specifically handle the desired presentation(s), and connecting
// directly to the dispatcher, bypassing the listener.
参考错误的说明,你自己的分析是正确的,内存资源比较紧张,降低SGA给更多的客户链接使用。
收起物理内存4G,操作系统会自动占用2G,oracle可用内存空间最多只有2G,故,SGA+PGA最多可以使用2G。如果连接数最大保留150不变,需调整SGA和PGA参数,150连接数应该设置 PGA为500M,故,SGA最大只能为1548M。
收起