Flink槽位满了

flink服务启动失败,报错原因:

javascript 复制代码
Caused by: org.postgresql.util.PSQLException: ERROR: all replication slots are in use
Hint: Free one or increase max_replication_slots.

日志:

javascript 复制代码
类名	:org.apache.flink.runtime.source.coordinator.SourceCoordinator
方法名:	lambda$runInEventLoop$10(SourceCoordinator.java:478)
内容	:Uncaught exception in the SplitEnumerator for Source org.apache.flink.util.FlinkRuntimeException: Fail to get or create slot for global stream split, the slot name is 130000fa4e20085ba54852927bad24cd811e10. Due to:
at com.ververica.cdc.connectors.postgres.source.enumerator.PostgresSourceEnumerator.createSlotForGlobalStreamSplit(PostgresSourceEnumerator.java:76)
at com.ververica.cdc.connectors.postgres.source.enumerator.PostgresSourceEnumerator.start(PostgresSourceEnumerator.java:50)
at org.apache.flink.runtime.source.coordinator.SourceCoordinator.lambda$start$1(SourceCoordinator.java:233)
at org.apache.flink.runtime.source.coordinator.SourceCoordinator.lambda$runInEventLoop$10(SourceCoordinator.java:469)
at org.apache.flink.util.ThrowableCatchingRunnable.run(ThrowableCatchingRunnable.java:40)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: ERROR: all replication slots are in use
Hint: Free one or increase max_replication_slots.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.createReplicationSlot(PostgresReplicationConnection.java:442)
at com.ververica.cdc.connectors.postgres.source.enumerator.PostgresSourceEnumerator.createSlotForGlobalStreamSplit(PostgresSourceEnumerator.java:71)
... 11 more
while {}. Triggering job failover.

排查后问题后发现:flink每一个任务会创建一个slot进行数据解析,重启服务,以前的slot的active为变为false,但不会删除,导致槽位满了,新增slot无法加入,导致服务启动失败

解决方案:手动删除无用槽位。

  • 1、查看当前使用的复制槽及其状态
sql 复制代码
SELECT * FROM pg_replication_slots;
  • 2、删除复制槽
sql 复制代码
//  slot_name是你希望删除的复制槽的名称
SELECT * FROM pg_drop_replication_slot('slot_name');
相关推荐
data analyse 4565 分钟前
服务端访问日志聚合 PV 与 UV 怎么实现?日志采集与口径设计
大数据·前端·数据分析
ZZ2026011519 分钟前
维普露禾平台免费开放,聊聊教育垂直大模型的RAG实现思路
大数据·人工智能·系统架构·知识图谱
小猴子爱上树19 分钟前
跨境电商AI图片翻译工具:批量图片翻译、视频字幕翻译与智能抠图一站式解决
大数据·人工智能·python·音视频
七十二时95625 分钟前
2026 企业级 AI 办公平台选型指南:如何判断哪些 AI 满足企业办公需求
大数据·人工智能
康实训41 分钟前
CGA老年综合评估是什么?评估体系、核心维度与行业应用标准解析
大数据·人工智能·实训室·实训室建设
SelectDB1 小时前
Doris VARIANT 速查:类型映射、建表写法、索引配置与常见注意点
大数据·数据库·数据分析
计算机编程指导师1 小时前
计算机毕设选题推荐:基于Spark+Django的黄金价格历史数据分析与可视化系统源码 毕业设计 选题推荐 毕设选题 数据分析 机器学习
大数据·python·计算机·spark·django·课程设计·黄金价格
weixin_460443562 小时前
在线考试人脸识别如何合规?本地活体检测、人脸模板加密与替代认证的技术架构设计
大数据·数据库·煤矿培训考试系统·煤矿在线考试系统·煤矿安全培训·煤矿考试系统
计算机编程指导师2 小时前
计算机毕设怎么做?基于Spark+Django的股票数据分析与可视化系统实战指导 源码 毕业设计 选题推荐 毕设选题 数据分析 机器学习
大数据·python·spark·django·毕业设计·股票·课程设计
SelectDB2 小时前
冷热分层速查手册:参数、命令、生效判据与常见失效原因一页看完
大数据·数据库·数据分析