ORA-00020 超过当前最大连接数

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/songyundong1993/article/details/76040466

alter system set processes=xx scope=spfile;

需重启数据库生效。

show parameter processes;

查看数据库最大连接数。


11g R2后

session=1.5*processes+22,随着processes的改变而改变。

展开阅读全文

连接池超过最大连接数问题

09-11

[9/11/12 14:26:23:860 CST] 000000aa SystemOut O 1981-09-28rn[9/11/12 14:26:23:860 CST] 000000aa SystemOut O rn[9/11/12 14:26:23:860 CST] 000000aa SystemOut O aaaa=5按机构查询客户与操作员信息==select p.cifno,p.cifname,p.idnum,p.mangno,t.name from cr_personinfo p left JOIN cms_tlrctl t on p.mangno=t.tlrno where p.delstat='0' and p.stat <='2' and length(p.cifno)>=10 and p.canalno = '09903' and rownum<21 and p.cifname like '%董红霞%' union all select p.cifno,p.cifname,p.license,p.mangno,t.name from cr_corp_inf p left JOIN cms_tlrctl t on p.mangno=t.tlrno where p.delstat='0' and p.stat <='2' and length(p.cifno)>=10 and p.canalno = '09903' and rownum<21 and p.cifname like '%董红霞%'rn[[color=#FF0000]9/11/12 14:26:27:806 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection getConnection()rn[9/11/12 14:26:27:818 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Check for timeout, activeCount=500, useCount=500rn[9/11/12 14:26:27:836 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Sleep until next testrn[9/11/12 14:26:28:854 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Check for timeout, activeCount=500, useCount=500rn[9/11/12 14:26:28:865 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Sleep until next testrn[9/11/12 14:26:29:885 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Check for timeout, activeCount=500, useCount=500rn[9/11/12 14:26:29:909 CST] 00000017 GenericDataSo I org.apache.struts.legacy.GenericDataSource getConnection Sleep until next test[/color]rnrn数据库为aix,was为webspherern今天出现两次由于超过最大连接池导致项目无法登陆,有一次还导致websphere宕掉。rn求解决方法?由于程序比较乱,而且是很多人都参与开发过?无法定位具体是由于什么原因导致的?rn我猜想有两种可能:1、是在访问了数据库没有释放链接所致,但功能模块太多,无法定位具体是那个模块?rn2、由于是中毒引起,因为该情况以前从来没有出现过,项目上线都半年了,今天才暴露这个问题。rn求高手帮忙解决一下?rn比如怎么定位错误?有什么命令可以定位具体是什么链接没有释放等等? 论坛

关于C3P0超过最大连接数问题

06-12

这几天我在测试C3P0数据库连接池技术时,发现在超过最大连接数后再去申请数据库连接,程序会一直处于等待状态,无任何异常抛出。请问如何获取这类异常信息?rn测试代码如下:rn[code=Java]rnimport java.beans.PropertyVetoException;rnimport java.sql.Connection;rnimport java.sql.SQLException;rnimport java.text.SimpleDateFormat;rnrnimport com.mchange.v2.c3p0.ComboPooledDataSource;rnimport com.mchange.v2.c3p0.DataSources;rnrnpublic class TestC3P01 rnrn /**rn * @param argsrn */rn public static void main(String[] args) rn ComboPooledDataSource cpds = new ComboPooledDataSource();rn rn try rn cpds.setDriverClass( "com.mysql.jdbc.Driver" );rn catch (PropertyVetoException e) rn e.printStackTrace();rn System.exit(1);rn rn cpds.setJdbcUrl( "jdbc:mysql://127.0.0.1:3306/test" ); rn cpds.setUser("hb"); rn cpds.setPassword("123456");rn cpds.setMinPoolSize(5);rn cpds.setMaxPoolSize(20);rn cpds.setInitialPoolSize(10);rn cpds.setAcquireRetryAttempts(1);rn rn SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");rn Connection[] c = new Connection[20];rn for(int i = 0; i < 20; i++) rn try rn System.out.println(df.format(new java.util.Date()));rn System.out.println("申请第" + i + "个数据库连接");rn c[i] = cpds.getConnection();rn System.out.println(df.format(new java.util.Date()));rn catch (SQLException e) rn System.out.println(df.format(new java.util.Date()));rn e.printStackTrace();rn rn rn try rn System.out.println("超过最大连接数后再次申请数据库连接");rn Connection con = cpds.getConnection();rn System.out.println(df.format(new java.util.Date()));rn catch (Exception e) rn System.out.println(df.format(new java.util.Date()));rn e.printStackTrace();rn System.exit(1);rn rn rn try rn DataSources.destroy( cpds );rn catch (SQLException e) rn e.printStackTrace();rn rn rnrnrn[/code] 论坛

大虾们帮帮忙!oracle超过最大连接数。。

09-16

哪位大虾!!帮我分析一下原因:rnrn程序使用数据源为WAS JNDI,WAS连接池最大200,共16个WAS集群rnrn数据库最大连接1000,并发400个用户,会抛异常超出数据库最大连接数.rnrnCaused by: java.sql.SQLException: ORA-00018: maximum number of sessions exceeded\rnrn查询连接情况:rn----------------------------------------------------------rnSQL> select count(*) from v$session where status='INACTIVE';rn rn COUNT(*)rn----------rn 288rn rnSQL> select count(*) from v$session where status='ACTIVE';rn rn COUNT(*)rn----------rn 33rnSQL> select count(*) from v$process;rn rn COUNT(*)rn----------rn 44rnrnrn数据库配置数rn------------------------------------------------------rnSQL> show parameter sessions;rn rnNAME TYPE VALUErn------------------------------------ ----------- ------------------------------rnjava_max_sessionspace_size integer 0rnjava_soft_sessionspace_limit integer 0rnlicense_max_sessions integer 0rnlicense_sessions_warning integer 0rnlogmnr_max_persistent_sessions integer 1rnsessions integer 1105rnshared_server_sessions integer 300rn rnSQL> show parameter processes;rn rnNAME TYPE VALUErn------------------------------------ ----------- ------------------------------rnaq_tm_processes integer 0rndb_writer_processes integer 1rngcs_server_processes integer 0rnjob_queue_processes integer 10rnlog_archive_max_processes integer 2rnprocesses integer 1000rnrnrn######################################################rnrn为什么会有这么多连接是未激活,而总连接也才321,会报超过最大连接数....rnrn 论坛

没有更多推荐了,返回首页