小编Pet*_*ete的帖子

与 pgBouncer 斗争

我有 Postgres 9.2 和 PgBouncer('stack builder' 附带的版本)。我有一个通过 Npgsql 2.0.12 版在 win7 机器上连接的 .net 应用程序。

我的应用程序可以直接连接到 postgres 服务器,但总是无法通过 pgbouncer 连接。

我到 npgsql 的连接字符串(经过一些替换)

Sslmode=Prefer;Timeout=40;Server={0};Port={3};User Id={4};Password={1};Database={2};Pooling=False;
Run Code Online (Sandbox Code Playgroud)

(我也尝试过使用 Protocol=3 显式连接到 PgBounce,但没有奏效。)

pgBounce ini 的数据库行是:

[databases]
something = host=localhost port=5433 dbname=somethingelse user=someone password=aaa
Run Code Online (Sandbox Code Playgroud)

在 userlist.txt 中,我根据需要有“某人”“aaa”。

当我的应用程序运行时,npgsql 显示“连接被强制关闭”并且 pgbouncer 错误日志显示:

2013-02-06 20:16:57.594 2444 LOG File descriptor limit: -1 (H:-1), max_client_conn: 1000, max fds possible: 1030
2013-02-06 20:16:57.649 2444 LOG listening on ::/6433
2013-02-06 20:16:57.657 2444 LOG listening on 0.0.0.0:6433
2013-02-06 20:16:57.659 2444 LOG process …
Run Code Online (Sandbox Code Playgroud)

postgresql postgresql-9.2 pgbouncer

6
推荐指数
2
解决办法
6924
查看次数

标签 统计

pgbouncer ×1

postgresql ×1

postgresql-9.2 ×1