- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
根据 https://pgbouncer.github.io/usage.html运行 KILL db;
应该立即断开给定数据库上的所有客户端和服务器连接。我试图使用
=# kill postgres;
它确实关闭了所有客户端和服务器连接,但我无法再连接到 postgres。
$ psql -h localhost -p 6543 postgres
psql: ERROR: pgbouncer cannot connect to server
在 postgresql.log 中我有以下消息
[2016-04-27 16:21:38 u=postgres d=postgres h=[local] p=12458 l=1] LOG: could not send data to client: Broken pipe
[2016-04-27 16:21:38 u=postgres d=postgres h=[local] p=12458 l=2] FATAL: connection to client lost
pgBouncer realod 不会改变这种情况,只有重启有帮助。
=# show databases;
name │ host │ port │ database │ force_user │ pool_size │ reserve_pool │ pool_mode │ max_connections │ current_connections
─────────┼──────┼──────┼──────────┼────────────┼───────────┼──────────────┼───────────┼─────────────────┼─────────────────────
postgres │ NULL │ 5454 │ postgres │ NULL │ 5 │ 100 │ NULL │ 0 │ 0
=# show version;
NOTICE: pgbouncer version 1.7.2
谢谢,米哈伊尔
最佳答案
对 pgBouncer 使用Resume 命令。
这在 pgBouncer 关于 Process Controlling Commands 的部分中没有准确记录,但是 KILL db;
命令实际上需要后续的 RESUME db;
命令来允许连接。
如果您查看 pgBouncer 日志文件,您应该会看到如下条目:
2016-12-16 22:07:10.224 5720 LOG C-0x851e28: dbname/username@127.0.0.1:42421 登录尝试:db=dbname user=username tls=no
2016-12-16 22:07:10.224 5720 LOG C-0x851e28: dbname/username@127.0.0.1:42421 关闭因为:pgbouncer 无法连接到服务器(age=0)
2016-12-16 22:07:10.224 5720 警告 C-0x851e28: dbname/username@127.0.0.1:42421 Pooler 错误:pgbouncer 无法连接到服务器
2016-12-16 22:07:10.224 5720 LOG S-0x85aae0: dbname/username@(bad-af):0 关闭因为: 暂停模式 (age=0)
请注意,pgBouncer 声称它在此日志中处于暂停模式,并且我看到 psql 在此状态下报告的相同错误:
psql:错误:pgbouncer 无法连接到服务器
在对 pgBouncer 执行 RESUME db;
命令后,连接应该会再次工作。
关于postgresql - pgbouncer kill 命令阻止后续连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36916450/
尝试在亚马逊上安装 pgbouncer 遇到了这个: [root@somehost ~]# uname -a Linux somehost 4.4.35-33.55.amzn1.x86_64 #1 S
文档将 avg_wait_time 描述为: Time spent by clients waiting for a server in microseconds (average per secon
我在 6432 端口上运行我的 postgres-9.2,在 5432 端口上运行 pgbouncer。我同事的客户端机器很少有服务器机器上 5432 端口的防火墙连接权限。但作为数据库管理员,我想限
我最近为连接池设置了 pgbouncer。我的 pgbouncer.ini 文件包含 [databases] mydb = host=localhost port=5432 user=user dbn
我尝试使用 pgBouncer 来消除短暂的网络断开连接。我做了一个测试,我有 Clinet->pgBouncer->Postgresql。当从客户端建立连接时,我断开网络电缆,如果我比 ~15 秒更
我在 pgBouncer 中设置了这个限制 max_client_conn = 2000 default_pool_size = 40 当我在 phpPgAdmin 中执行此 SQL 时,只出现 2
我在 php 中使用了 PostgreSQL。一段时间后,客户端连接变大,所以我尝试使用 pgbouncer 设置最大连接等。我的数据库端口是 5432,我所有的 php 使用该端口连接到我的数据库。
我们正在考虑在我们的项目中使用 pgbouncer,其中包括动态数据库创建(即添加的每个租户 - 创建一个新数据库) 据我了解,pgbouncer 采用映射数据库的配置文件。 问题是 - 有没有办法在
我需要配置我的 pgbouncer 以处理超过 2000 个客户端连接,我正在阅读一些关于如何使用最大连接数的信息,然后我明白了我必须做什么 max_client_con = 2000在 pgbo
我在 5432 上运行 Postgres 数据库,在 6432 上运行 pgBouncer。 我所有的脚本都指向 6432,但我们有一个指向 5432 的大型遗留代码库,我们也希望它有用户 pgBou
我正在使用 pgbouncer-rr 在 redshift 集群中进行查询重写(pgbouncer 调用 rewrite_query.py 进行重写,这里是有关此项目的更多信息的链接 - https:
我正在尝试尽可能多地了解特定类型的更新查询来自哪个主机。 我的数据库是 PostgreSQL 9.0.23,本地运行 pgbouncer 用于连接池。池化类型为交易池。 数据库中保存来自 pg_sta
我在网络应用程序上使用 pgbouncer,大多数线程以 BEGIN 开始,以 COMMIT 或 ROLLBACK 结束,所以我们使用事务池,一切都很好。 但是,我们也有一些不使用事务的进程:相反,它
我已经设置了 PGBouncer 并将其配置为连接到我的 postgres 数据库,并且一切正常,但我不确定它是否真的有效。 我有一个 php 脚本作为守护进程运行并获取 beantalk 作业。问题
根据 https://pgbouncer.github.io/usage.html运行 KILL db; 应该立即断开给定数据库上的所有客户端和服务器连接。我试图使用 在我的测试环境中停止所有与 po
我在 Django 中使用 pgbouncer。我已经将 test_foo 数据库添加到它的配置中以便能够运行测试,因为显然 Django 不能为测试数据库使用不同的端口。现在测试运行但最后,当 Dj
我在事务模式下使用 pgbouncer 并试图允许接近 500 个事件事务。目的只是对设置进行压力测试 当前设置:[ 'n' 个客户 --->1 个 pgbouncer ----> 1 个 postg
我很难找到关于使用 pgbouncer 进行事务池与 session 池的优点/缺点的良好总结。 这是否意味着事务繁重的工作负载在某种程度上可以更好地实现负载平衡?是为了防止从 pgbouncer 连
我正在尝试使用 pgbouncer 1.7.2 为 Windows 10 上的 PostgreSQL 9.6 设置连接池。 尝试在 cmd 中连接到 pgbouncer psql -p 643
技术细节 转到版本 1.2 go bmizerany/pq 的 postrgres 库 这个问题让我很生气,我希望有人能够提供帮助。 我在 golang 中开发了一个应用程序来从 postgres 数
我是一名优秀的程序员,十分优秀!