【问题标题】:pgAdmin connection error to pgpoolpgAdmin 到 pgpool 的连接错误
【发布时间】:2016-05-29 14:49:03
【问题描述】:

我正在使用 pgAdmin III 从客户端管理我的数据库。我有一个以流复制模式运行的主从 postgreSQL。他们前面还有另一个 pgpool 服务器来做连接池和负载平衡。

当我将 pgAdmin 连接到 pgpool 时,我得到了:

Error connecting to the server: ERROR: unable to read message kind
DETAIL: kind does not match between master(52) slot[1] (45)

我之前连接它没有问题,但不知何故 pgpool 死了,我重新启动它,然后这个错误突然出现。

pgpool 和 postgreSQL 服务器运行良好。我可以通过psql -h hostname database user 访问它们。应用服务器也可以连接到它,并且 Web 应用程序正常运行。我只是无法从 pgAdmin 访问它。

【问题讨论】:

  • @J Freebird,你用的是哪个系统?
  • @J Freebird,你有没有找到解决这个问题的方法?我刚刚在 pgpool2 3.6 版中也遇到过

标签: postgresql pgadmin pgpool


【解决方案1】:

http://www.sraoss.jp/pipermail/pgpool-general/2012-March/000297.html

简而言之:max_connections 在 postgres 集群上被超出。

我假设已经发生了——你重新启动了 pgpool,它打开了到 postgres 的新连接,而旧的连接留在了 idleidle in transaction(取决于超时)。所以在重新启动 pgpool 后,它消耗了两倍的数量 of num_init_children 并达到了实际允许的 maximum

杀死旧的(重新启动之前)pgpool 连接应该可以修复它。尝试在 postgres 上运行 pg_terminate_backend(pid) 以执行此操作。还要小心杀死正确的连接。至少检查一下

select pid,query, client_address 
from pg_stat_activity where now()-query_start > '1 day'::interval

或类似的只捕捉僵尸

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-08
    • 1970-01-01
    • 2020-04-30
    • 1970-01-01
    • 1970-01-01
    • 2015-04-11
    • 2013-11-16
    • 2020-04-22
    相关资源
    最近更新 更多