【发布时间】:2012-05-08 20:59:31
【问题描述】:
我一直在尝试将 PgPool 配置为接受大约 150 个请求。Postgres 服务器配置为仅接受 100 个连接。超过 100 的任何东西都需要由 PgPool 池化。我似乎不明白这一点。我只需要 PgPool 对请求进行排队,我当前的配置不这样做。在我的 JMeter 测试中,当我尝试连接超过 100 个时,postgres 给我一个错误提示 PSQL 错误:sorry, too many clients。
我只用以下参数配置了 PGPool:
listen_address = 'localhost'
port = 9999
backend_hostname0 = 'localhost'
backend_port0 = 5432
num_init_children = 100
max_pool = 4
child_life_time =120
child_max_connections = 0
connections_life_tome = 120
client_idle_limit = 0
既然我只需要 PgPool 来排队额外的连接请求,那么上面的配置是否正确? 请告知正确的配置。
【问题讨论】:
-
您是在应用程序中定位 pgpool 实例而不是直接连接到 Postgresql 吗?
-
我正在通过 PGPool 端口 9999
jdbc:postgresql://localhost:9999/dbname?user=username&password=passwordofuser连接到 postgres 服务器
标签: postgresql pgpool