即使打开的连接很少,我也会不断收到这些错误。我改用 DBCP 没有问题。
[ERROR] com.zaxxer.hikari.HikariPool - Maximum connection creation retries exceeded: FATAL: remaining connection slots are reserved for non-replication superuser connections
org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:572) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:177) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.Driver.makeConnection(Driver.java:410) ~[postgresql-9.3-1100-jdbc41.jar:na]
at org.postgresql.Driver.connect(Driver.java:280) ~[postgresql-9.3-1100-jdbc41.jar:na]