大佬们麻烦进来看下,帮帮忙。。clickhouse 报错。。。

发布于 1 年前 作者 qiu-zhiwei 2158 次浏览 来自 问答

使用 clickhouse_driver 编写的查询代码,有时候可以执行成功,查询耗时 4 秒左右,有时候就报错,报错之后只有重启 clickhouse 服务才可以恢复这个接口(报错的时候,其他查询接口不受影响)。我执行的语句是很多 sql union all 在一起,可能有 1000 多个 union,报错信息如下:

clickhouse_driver.errors.ServerException: Code: 279. DB::Exception: All connection tries failed. Log:

Code: 32, e.displayText() = DB::Exception: Attempt to read after eof (version 20.11.4.13 (official build)) Code: 32, e.displayText() = DB::Exception: Attempt to read after eof (version 20.11.4.13 (official build)) Code: 32, e.displayText() = DB::Exception: Attempt to read after eof (version 20.11.4.13 (official build))

: While executing Remote. Stack trace:

PoolWithFailoverBaseDB::IConnectionPool::getMany(unsigned long, unsigned long, unsigned long, unsigned long, bool, std::__1::function<PoolWithFailoverBaseDB::IConnectionPool::TryResult (DB::IConnectionPool&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)> const&, std::__1::function<unsigned long (unsigned long)> const&) @ 0xe2aa967 in /usr/bin/clickhouse DB::ConnectionPoolWithFailover::getManyImpl(DB::Settings const*, DB::PoolMode, std::__1::function<PoolWithFailoverBaseDB::IConnectionPool::TryResult (DB::IConnectionPool&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)> const&) @ 0xe2a9355 in /usr/bin/clickhouse DB::ConnectionPoolWithFailover::getManyChecked(DB::ConnectionTimeouts const&, DB::Settings const*, DB::PoolMode, DB::QualifiedTableName const&) @ 0xe2a96aa in /usr/bin/clickhouse ? @ 0xd50a8b4 in /usr/bin/clickhouse DB::RemoteQueryExecutor::sendQuery() @ 0xd4ff814 in /usr/bin/clickhouse DB::RemoteSource::generate() @ 0xe4c37ac in /usr/bin/clickhouse DB::ISource::work() @ 0xe36459a in /usr/bin/clickhouse DB::SourceWithProgress::work() @ 0xe4c927a in /usr/bin/clickhouse ? @ 0xe39d37c in /usr/bin/clickhouse DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>) @ 0xe39a4a7 in /usr/bin/clickhouse ? @ 0xe39f455 in /usr/bin/clickhouse ThreadPoolImplstd::__1::thread::worker(std::__1::__list_iterator<std::__1::thread, void>) @ 0x7b7293d in /usr/bin/clickhouse ? @ 0x7b76463 in /usr/bin/clickhouse start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so __clone @ 0xfe8dd in /usr/lib64/libc-2.17.so

3 回复

union all 中存在结果为空的返回

@IVitamin-C 啊 我查查看 谢谢!

@IVitamin-C 这个有时候可以成功,有时候失败。。。

回到顶部