浅析[53300] FATAL: remaining connection slots are reserved for non-replication superuser connections


  使用psql无法连接数据库,并报错 FATAL:53300

(1)psql: FATAL: 53300: remaining connection slots are reserved for non-replication superuser connections

(2)普通用户的连接已满,保留用于非复制的超级用户连接。

  由于连接已满,可以关闭空闲的连接。

1、查询当前所有连接的状态

select datname,pid,application_name,state from pg_stat_activity;

2、如何查看为超级用户保留的连接数

show superuser_reserved_connections;

3、当前总共正在使用的连接数:

select count(1) from pg_stat_activity;

4、显示系统最大连接数

show max_connections;

5、显示系统保留的用户数

show superuser_reserved_connections;

6、通过pid终止空闲连接

select pg_terminate_backend(pid) from pg_stat_activity; 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM