postgres +休眠
我正在使用 postgres + hibernate + jboss Final 6.0.0 服务器。
当我尝试打开数据库连接时,它抛出以下异常:
Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
2011-10-11 04:28:06,921 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
2011-10-11 04:28:06,921 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
I am using postgres + hibernate + jboss final 6.0.0 server.
When I try to open the database connection, it throws the following exception:
Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
2011-10-11 04:28:06,921 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
2011-10-11 04:28:06,921 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
2011-10-11 04:28:06,922 ERROR [STDERR] (http-69.89.2.245-8080-11)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查 postgresql.conf 中的 max_connections 属性。默认情况下为 100。如果需要,请增加它。另请检查您是否关闭了连接。
Check max_connections property in postgresql.conf. By default it's 100. Increase it if you need. Also check that you close your connections.
您已达到 postgresql.conf 中设置的允许客户端的最大限制。
您应该检查此配置文件,并增加 max_connections 变量或检查您的 min-pool-size 和 max-pool-size 值JBoss 数据源声明,并设置较低的值以满足 Postgres 配置。
You have hit the maximum limit of allowed clients set in postgresql.conf.
You should check this configuration file, and increase the max_connections variable or check the min-pool-size and max-pool-size values at your JBoss datasource declaration, and set lower values to meet the Postgres configuration.
要清除数据库连接:
启动 psql 终端并:
To clear your database connections:
Start a psql terminal and: