简体   繁体   English

带有默认连接池和postgresql 9.4.4的Slick 3.0正在通过“已经有太多客户端”错误

[英]Slick 3.0 with default connection pooling and postgresql 9.4.4 is throughing “too many clients already” error

Currently I am building an application with micro services. 目前我正在构建一个微服务应用程序。 I have three instances which are actually interacting with the database ie Postgresql 9.4.4. 我有三个实际与数据库交互的实例,即Postgresql 9.4.4。

Below is my connection properties with slick 3.0 下面是我与slick 3.0的连接属性

dev {

# Development Database configuration
# ~~~~~
dbconf {
    dataSourceClass="org.postgresql.ds.PGSimpleDataSource"
    properties {
        user="xyz"
        password="dev@xyz"
        databaseName="dev_xyz"
        serverName="localhost"
    }
    numThreads=10
}
}

The problem is that I am getting this FATAL: sorry, too many clients already error. 问题是我收到了这个致命错误:对不起,太多的客户已经出错了。 max_connections in postgresql is 100 which is the default. postgresql中的max_connections是100,这是默认值。 As per the discussions in the web I might have to use a connection pool for this, which is I am doing by using Slick's default connection pool HikariCP. 根据网络上的讨论,我可能必须使用连接池,这是我使用Slick的默认连接池HikariCP。 I am damn confuse right now, what step should I take to resolved this issue. 我现在很困惑,我应该采取什么措施来解决这个问题。

Add the maxConnections parameter to your configuration. maxConnections参数添加到配置中。

dbconf {
  numThreads=10
  maxConnections=10
}

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

相关问题 Slick和bonecp:org.postgresql.util.PSQLException:致命:对不起,太多客户端已经出错了 - Slick and bonecp: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already error Apache Cayenne / PostgreSQL:“已有太多客户端”错误 - Apache Cayenne / PostgreSQL: “too many clients already” error C#和PostgreSQL中已有太多客户端 - Too Many Clients Already in C# and PostgreSQL 会话表有太多客户端已经出错 - Too many clients already error for session table PostgreSQL:负载测试抛出错误 - Npgsql.PostgresException:“53300:抱歉,已经有太多客户端” - PostgreSQL: Load testing throws error - Npgsql.PostgresException: '53300: sorry, too many clients already' 错误:抱歉,已经有太多客户了 - Error: sorry, too many clients already Postgresql在linux服务器上有太多客户端错误 - Postgresql too many clients error on linux server PostgreSQL演变:“PSQLException:致命:抱歉,已经有太多客户” - PostgreSQL Evolutions: “PSQLException: FATAL: sorry, too many clients already” 使用postgresql的非常简单的jsf应用程序中“已经有太多客户端” - “too many clients already” in a very simple jsf app using postgresql 已经连接太多了 - Too many connection already
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM