`
Fangrn
  • 浏览: 801084 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ORA-12520, TNS:listener could not find available handler for requested type of s

阅读更多

项目上线有两天了,今天突然出现应用服务器宕机的事,首先介绍一下服务器情况:
web server:2台hp小机每台机器各两个节点,web容器:weblogic 9,db为oracle10g;

节点全部宕机,只好都重启吧,结果重启的时候报错:
<Aug 12, 2009 5:08:23 PM GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "SNTELECOM-
DATASOURCE": Listener refused the connection with the following error:
ORA-12520, TNS:listener could not find available handler for requested type of server
The Connection descriptor used by the client was:
(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA =(SERVICE_NAME = stoadb)(SERVER = SHARED)))
> 
<Aug 12, 2009 5:08:24 PM GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "SNTELECOM-
DATASOURCE": Listener refused the connection with the following error:
ORA-12520, TNS:listener could not find available handler for requested type of server
The Connection descriptor used by the client was:
(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA =(SERVICE_NAME = stoadb)(SERVER = SHARED)))
> 
<Aug 12, 2009 5:08:25 PM GMT+08:00> <Warning> <JDBC> <BEA-001129> <Received exception while creating connection for pool "SNTELECOM-
DATASOURCE": Listener refused the connection with the following error:
ORA-12520, TNS:listener could not find available handler for requested type of server
The Connection descriptor used by the client was:
(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = ×.×.×.×)(PORT = 1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA =(SERVICE_NAME = stoadb)(SERVER = SHARED))) 
 狂汗中.........赶紧查问题解决吧。

在网上找到相关资料,对于这个问题的起因有两种说法

1)数据库是专用服务器,但是在tnsname.ora配置中设置了连接方式为shared,这种情况下打开tnsname.ora,
   把(server = shared) 改成 (server = dedicate)
2)是由于process不够引起的
后来查看到v$process一直涨到140多,而我的数据库设置的是150.据此大致能断定process不够,用以下语句修改数据库的processes值
alter system set processes=500 scope=spfile(由于processes是静态参数,scope只能为spfile,在v$sgastate条件为'procesees'中可以看到会每个process会点4个字节),
重新启动数据库使新改的processes生效.再重新跑eclipse,就能正常启动了.

note:如果在hibernate中的hibernate.connection.provider_class选择的是c3p0的就会出这种 情况,其它的好像不会.很奇怪为什么c3p0会打开那么多个processs, 在shared连势接方式下,shared_server即是一直连在数据库的process值,注意这点
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics