Clickhouse 同步mysql报错 Cannot read all data. Bytes read: 0. Bytes expected

Code: 33. DB::Exception: Cannot read all data. Bytes read: 0. Bytes expected: 3. (CANNOT_READ_ALL_DATA), Stack trace (when copying this message, always include the lines below):

0. ./clickhouse_build/../src/Common/Exception.cpp:69: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa5d28da in /clickhouse/bin/clickhouse
1. ./clickhouse_build/../src/IO/ReadBuffer.h:0: DB::ReadBuffer::readStrict(char*, unsigned long) @ 0xa62a5a2 in /clickhouse/bin/clickhouse
2. ./clickhouse_build/../src/IO/MySQLPacketPayloadReadBuffer.cpp:28: DB::MySQLPacketPayloadReadBuffer::nextImpl() @ 0x1495a865 in /clickhouse/bin/clickhouse
3. ./clickhouse_build/../src/IO/ReadBuffer.h:65: DB::MySQLReplication::MySQLFlavor::readPayloadAndFun(DB::ReadBuffer&, unsigned char&, bool, std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)> const&) @ 0x14971e35 in /clickhouse/bin/clickhouse
4. ./clickhouse_build/../contrib/libcxx/include/__memory/shared_ptr.h:594: DB::MaterializedMySQLSyncThread::synchronization() @ 0x14baecd5 in /clickhouse/bin/clickhouse
5. ./clickhouse_build/../src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:0: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_1>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_1&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x14bce18c in /clickhouse/bin/clickhouse
6. ./clickhouse_build/../base/base/../base/wide_integer_impl.h:772: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xa67a575 in /clickhouse/bin/clickhouse
7. ./clickhouse_build/../contrib/libcxx/include/__memory/unique_ptr.h:312: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0xa67f27d in /clickhouse/bin/clickhouse
8. ? @ 0x7f0c13828609 in ?
9. __clone @ 0x7f0c1374d133 in ?
 (version 22.8.5.29)

1,用clickhouse自带的MaterializeMySQL引擎,同步mysql数据时报了上述错误

2,解决思路:

        1)clickhouse 内存是否已经占满,如果一次向CH当中插入过多的数据,会出现这种情况

         2)CH 这边要同步MySQL的数据是根据binlog来同步的,刚才的报错是binlog被服务端清理掉了。两种情况(1)binlog 过期时间太短了。(2)RDS 还有一种策略是磁盘满了,也会清理binlog.

        3) 解决办法:  升级内存等硬件,修改binlog过期策略,重建MM映射表~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值