org.postgresql.util.PSQLException:致命:抱歉,已经有太多客户了 [英] org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
问题描述
我正在尝试连接到Postgresql数据库,我收到以下错误:
I am trying to connect to a Postgresql database, I am getting the following Error:
错误:org.postgresql.util。 PSQLException:致命:抱歉,已经有太多客户
Error:org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
错误是什么意思,我该如何解决?
What does the error mean and how do I fix it?
我的 server.properties
文件如下:
serverPortData=9042
serverPortCommand=9078
trackConnectionURL=jdbc:postgresql://127.0.0.1:5432/vTrack?user=postgres password=postgres
dst=1
DatabaseName=vTrack
ServerName=127.0.0.1
User=postgres
Password=admin
MaxConnections=90
InitialConnections=80
PoolSize=100
MaxPoolSize=100
KeepAliveTime=100
TrackPoolSize=120
TrackMaxPoolSize=120
TrackKeepAliveTime=100
PortNumber=5432
Logging=1
推荐答案
我们不知道 server.properties 文件就是那个,我们都不知道什么 SimocoPoolSize 意味着(是吗?)
We don't know what server.properties file is that, we neither know what SimocoPoolSize means (do you?)
让我猜你正在使用一些自定义的数据库连接池。然后,我想问题是您的池配置为打开100或120个连接,但Postgresql服务器配置为接受 MaxConnections = 90
。这些似乎是冲突的设置。尝试增加 MaxConnections = 120
。
Let's guess you are using some custom pool of database connections. Then, I guess the problem is that your pool is configured to open 100 or 120 connections, but you Postgresql server is configured to accept MaxConnections=90
. These seem conflictive settings. Try increasing MaxConnections=120
.
但是你应该先了解你的数据库层基础设施,知道你在使用哪个池,如果你真的需要池中的这么多开放连接。而且,特别是,如果您正在优雅地将打开的连接返回到池
But you should first understand your db layer infrastructure, know what pool are you using, if you really need so many open connections in the pool. And, specially, if you are gracefully returning the opened connections to the pool
这篇关于org.postgresql.util.PSQLException:致命:抱歉,已经有太多客户了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!