开发者社区 > 大数据与机器学习 > 实时数仓 Hologres > 正文

Hologres早上9点15分开始突然连不上了,是什么原因呢?

ff639789351e90fdd2deff289d5cfa9e.png
Hologres早上9点15分开始突然连不上了,是什么原因呢?
{"code":2100001000,"raw":{"data":{"code":null,"success":false,"data":null,"errCode":2100001000,"errMsg":"get table detail occurs FATAL: Connect to FE failed, remaining connection slots are reserved for non-replication superuser connections","requestId":"c0ca9bde-5d93-4c13-89fc-9994eba0cd6e"},"raw":{}},"request":{"url":"/rest/v0/table","data":{"connId":"1767363541654671362","dbName":"flowload","schemaName":"public","tableName":"amg_flowconfig_check_table_data"},"headers":{}},"response":{"data":{"data":{"code":null,"success":false,"data":null,"errCode":2100001000,"errMsg":"get table detail occurs FATAL: Connect to FE failed, remaining connection slots are reserved for non-replication superuser connections","requestId":"c0ca9bde-5d93-4c13-89fc-9994eba0cd6e"},"raw":{}}}}

展开
收起
嘟嘟嘟嘟嘟嘟 2024-05-03 07:51:47 38 0
1 条回答
写回答
取消 提交回答
  • 是不是连接数打满了 https://help.aliyun.com/zh/hologres/user-guide/manage-connections?spm=a2c4g.11186623.0.i23
    这个异常通常是由于连接数打满导致
    解决方案:
    可以通过Superuser账号连接实例,执行如下语句查看空闲连接是否过多。select * from pg_stat_activity where backend_type = 'client backend' and state = 'idle';

    如果查询结果显示空闲进程过多,并且确定是无用的空闲连接时,可以找到上述语句结果中的pid字段,并执行如下语句释放空闲连接:
    select pg_cancel_backend(); -- cancel该连接上的queryselect pg_terminate_backend(); --杀掉对应的后台连接进程--批量终止后台IDLE连接进程,释放连接SELECT pg_terminate_backend(pid) ,query ,datname ,usename ,application_name ,client_addr ,client_port ,backend_start ,stateFROM pg_stat_activityWHERE length(query) > 0AND pid != pg_backend_pid()AND backend_type = 'client backend'AND state = 'idle'AND application_name != 'hologres'AND usename != 'holo_admin'AND query not like '%pg_cancel_backend%';
    此回答整理自钉群“实时数仓Hologres交流群”

    2024-05-04 07:50:03
    赞同 展开评论 打赏

本技术圈将为大家分析有关阿里云产品Hologres的最新产品动态、技术解读等,也欢迎大家加入钉钉群--实时数仓Hologres交流群32314975

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载