简体   繁体   English

Postgresql在linux服务器上有太多客户端错误

[英]Postgresql too many clients error on linux server

when i try connect postgresql 9.0 server on linux i get too many clients connected already. 当我尝试在linux上连接postgresql 9.0服务器时,我已经连接了太多客户端。 I tried increasing max_connections from 100 to 200 and start the server it doest take the max connections. 我尝试将max_connections从100增加到200并启动服务器,它执行最大连接。 What should i change on the linux server 我应该在linux服务器上更改什么

Eclipse LogCat Eclipse LogCat

Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
       at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
       at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
       at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
       at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
       at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
       at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)

这是一个常见问题解答,并在PostgreSQL维基上的数据库连接数中进行了讨论。

The only way to increase max_connections and persist this value is modifying the postgresql.conf file, so first of all, check if the value has changed (after restarting the server): 增加max_connections并保持此值的唯一方法是修改postgresql.conf文件,首先,检查值是否已更改(重新启动服务器后):

show max_connections

If the value DID NOT change, there's something wrong with your procedure (file permissions maybe?). 如果值DID没有改变,你的程序有问题(文件权限可能?)。 If the value DID change, you might try with a higher value (weird, but might depend on your application connection requirements, OR a connection leak). 如果值DID发生更改,您可能会尝试使用更高的值(很奇怪,但可能取决于您的应用程序连接要求或连接泄漏)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM