2024.03.05 09:35:15.790258 [ 336 ] {} Context: Server was built with sanitizer. It will work slowly. 2024.03.05 09:35:15.790338 [ 336 ] {} Context: Server logging level is set to 'test' and performance is degraded. This cannot be used in production. 2024.03.05 09:35:15.790994 [ 336 ] {} Context: The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables. But the feature of 'zero-copy replication' is under development and is not ready for production. The usage of this feature can lead to data corruption and loss. The setting should be disabled in production. 2024.03.05 09:35:16.229586 [ 336 ] {} KeeperLogStore: No logs exists in /var/lib/clickhouse/coordination/logs. It's Ok if it's the first run of clickhouse-keeper. 2024.03.05 09:35:16.229765 [ 336 ] {} KeeperLogStore: Removing all changelogs 2024.03.05 09:35:16.230232 [ 336 ] {} KeeperServer: Got 1000000000000000 value for setting 'reserved_log_items' which is bigger than int32_t max value, lowering value to 2147483647. 2024.03.05 09:35:16.231062 [ 336 ] {} KeeperStateManager: No state was read 2024.03.05 09:35:16.231085 [ 336 ] {} RaftInstance: invalid election timeout lower bound detected, adjusted to 0 2024.03.05 09:35:16.231094 [ 336 ] {} RaftInstance: invalid election timeout upper bound detected, adjusted to 0 2024.03.05 09:35:16.281392 [ 549 ] {} RaftInstance: Election timeout, initiate leader election 2024.03.05 09:35:16.294472 [ 336 ] {} Access(local directory): File /var/lib/clickhouse/access/users.list doesn't exist 2024.03.05 09:35:16.294491 [ 336 ] {} Access(local directory): Recovering lists in directory /var/lib/clickhouse/access/ 2024.03.05 09:35:16.310997 [ 336 ] {} Context: Table system.session_log is enabled. It's unreliable and may contain garbage. Do not use it for any kind of security monitoring. 2024.03.05 09:35:39.808276 [ 336 ] {} KeeperLogStore: Changelog is shut down 2024.03.05 09:35:41.533761 [ 696 ] {} Context: Server was built with sanitizer. It will work slowly. 2024.03.05 09:35:41.533848 [ 696 ] {} Context: Server logging level is set to 'test' and performance is degraded. This cannot be used in production. 2024.03.05 09:35:41.534557 [ 696 ] {} Context: The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables. But the feature of 'zero-copy replication' is under development and is not ready for production. The usage of this feature can lead to data corruption and loss. The setting should be disabled in production. 2024.03.05 09:35:41.966827 [ 696 ] {} KeeperServer: Got 1000000000000000 value for setting 'reserved_log_items' which is bigger than int32_t max value, lowering value to 2147483647. 2024.03.05 09:35:41.967585 [ 696 ] {} RaftInstance: invalid election timeout lower bound detected, adjusted to 0 2024.03.05 09:35:41.967593 [ 696 ] {} RaftInstance: invalid election timeout upper bound detected, adjusted to 0 2024.03.05 09:35:42.018000 [ 910 ] {} RaftInstance: Election timeout, initiate leader election 2024.03.05 09:35:42.147255 [ 990 ] {} Container already exists, returning the existing container: std::exception. Code: 1001, type: Azure::Storage::StorageException, e.what() = 409 The specified container already exists. The specified container already exists. RequestId:43bb2cec-ddca-48f3-8a13-84be462edbba Time:2024-03-05T14:35:42.054Z Request ID: 43bb2cec-ddca-48f3-8a13-84be462edbba, Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./contrib/llvm-project/libcxx/src/support/runtime/stdexcept_default.ipp:33: std::runtime_error::runtime_error(String const&) @ 0x35281f9f in /usr/bin/clickhouse 2. ./build_docker/./contrib/azure/sdk/core/azure-core/inc/azure/core/exception.hpp:29: Azure::Storage::StorageException::CreateFromResponse(std::unique_ptr>) @ 0x324e0f2a in /usr/bin/clickhouse 3. ./build_docker/./contrib/azure/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/protocol/blob_rest_client.hpp:4760: Azure::Storage::Blobs::_detail::BlobRestClient::BlobContainer::Create(Azure::Core::Http::_internal::HttpPipeline&, Azure::Core::Url const&, Azure::Storage::Blobs::_detail::BlobRestClient::BlobContainer::CreateBlobContainerOptions const&, Azure::Core::Context const&) @ 0x324821bc in /usr/bin/clickhouse 4. ./build_docker/./contrib/azure/sdk/core/azure-core/inc/azure/core/nullable.hpp:91: Azure::Storage::Blobs::BlobContainerClient::Create(Azure::Storage::Blobs::CreateBlobContainerOptions const&, Azure::Core::Context const&) const @ 0x3247f977 in /usr/bin/clickhouse 5. ./build_docker/./contrib/llvm-project/libcxx/include/string:2067: Azure::Storage::Blobs::BlobServiceClient::CreateBlobContainer(String const&, Azure::Storage::Blobs::CreateBlobContainerOptions const&, Azure::Core::Context const&) const @ 0x3249d4c1 in /usr/bin/clickhouse 6. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: DB::getAzureBlobContainerClient(Poco::Util::AbstractConfiguration const&, String const&) @ 0x2ed1e166 in /usr/bin/clickhouse 7. ./build_docker/./src/Disks/ObjectStorages/AzureBlobStorage/registerDiskAzureBlobStorage.cpp:31: std::shared_ptr std::__function::__policy_invoker (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr, std::map, std::less, std::allocator>>> const&)>::__call_impl (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr, std::map, std::less, std::allocator>>> const&)>>(std::__function::__policy_storage const*, String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr&&, std::map, std::less, std::allocator>>> const&) @ 0x2ed1b9f1 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:0: std::function (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr, std::map, std::less, std::allocator>>> const&)>::operator()(String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr, std::map, std::less, std::allocator>>> const&) const @ 0x2ec3e3a3 in /usr/bin/clickhouse 9. ./build_docker/./src/Disks/DiskFactory.cpp:0: DB::DiskFactory::create(String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr, std::map, std::less, std::allocator>>> const&) const @ 0x2ec3e18f in /usr/bin/clickhouse 10. ./build_docker/./src/Disks/DiskSelector.cpp:49: DB::DiskSelector::initialize(Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr) @ 0x2ef5322f in /usr/bin/clickhouse 11. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Context::getDiskSelector(std::lock_guard&) const @ 0x2eee7ecf in /usr/bin/clickhouse 12. ./build_docker/./src/Interpreters/Context.cpp:3136: DB::Context::getStoragePolicySelector(std::lock_guard&) const @ 0x2eed09a1 in /usr/bin/clickhouse 13. ./build_docker/./src/Interpreters/Context.cpp:3068: DB::Context::getStoragePolicy(String const&) const @ 0x2eee8371 in /usr/bin/clickhouse 14. ./build_docker/./src/Storages/MergeTree/MergeTreeData.cpp:0: DB::MergeTreeData::getStoragePolicy() const @ 0x30ff4d74 in /usr/bin/clickhouse 15. ./build_docker/./src/Storages/MergeTree/MergeTreeData.h:912: DB::MergeTreeData::getDisks() const @ 0x30ebdcd7 in /usr/bin/clickhouse 16. ./build_docker/./contrib/llvm-project/libcxx/include/vector:1420: DB::MergeTreeData::initializeDirectoriesAndFormatVersion(String const&, bool, String const&, bool) @ 0x30fef631 in /usr/bin/clickhouse 17. ./build_docker/./src/Storages/StorageMergeTree.cpp:0: DB::StorageMergeTree::StorageMergeTree(DB::StorageID const&, String const&, DB::StorageInMemoryMetadata const&, bool, std::shared_ptr, String const&, DB::MergeTreeData::MergingParams const&, std::unique_ptr>, bool) @ 0x3140188b in /usr/bin/clickhouse 18. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:35: DB::StorageMergeTree* std::construct_at[abi:v15000]&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>, bool const&, DB::StorageMergeTree*>(DB::StorageMergeTree*, DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>&&, bool const&) @ 0x31401219 in /usr/bin/clickhouse 19. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:302: void std::allocator_traits>::construct[abi:v15000]&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>, bool const&, void, void>(std::allocator&, DB::StorageMergeTree*, DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>&&, bool const&) @ 0x31400d3c in /usr/bin/clickhouse 20. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:292: std::__shared_ptr_emplace>::__shared_ptr_emplace[abi:v15000]&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>, bool const&>(std::allocator, DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>&&, bool const&) @ 0x31400b4c in /usr/bin/clickhouse 21. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:953: std::shared_ptr std::allocate_shared[abi:v15000], DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>, bool const&, void>(std::allocator const&, DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>&&, bool const&) @ 0x3140087a in /usr/bin/clickhouse 22. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:962: std::shared_ptr std::make_shared[abi:v15000]&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>, bool const&, void>(DB::StorageID const&, String const&, DB::StorageInMemoryMetadata&, bool const&, std::shared_ptr&, String&, DB::MergeTreeData::MergingParams&, std::unique_ptr>&&, bool const&) @ 0x313ff8e1 in /usr/bin/clickhouse 23. ./build_docker/./src/Storages/MergeTree/registerStorageMergeTree.cpp:0: DB::create(DB::StorageFactory::Arguments const&) @ 0x313fb3f9 in /usr/bin/clickhouse 24. ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:0: DB::StorageFactory::get(DB::ASTCreateQuery const&, String const&, std::shared_ptr, std::shared_ptr, DB::ColumnsDescription const&, DB::ConstraintsDescription const&, bool) const @ 0x309107d9 in /usr/bin/clickhouse 25. ./build_docker/./src/Databases/DatabaseOnDisk.cpp:110: DB::createTableFromAST(DB::ASTCreateQuery, String const&, String const&, std::shared_ptr, bool) @ 0x2eba6cdf in /usr/bin/clickhouse 26. ./build_docker/./src/Databases/DatabaseOrdinary.cpp:0: DB::DatabaseOrdinary::loadTableFromMetadata(std::shared_ptr, String const&, DB::QualifiedTableName const&, std::shared_ptr const&, DB::LoadingStrictnessLevel) @ 0x2ebcbdf1 in /usr/bin/clickhouse 27. ./build_docker/./src/Databases/TablesLoader.cpp:209: void std::__function::__policy_invoker::__call_impl>&, std::shared_ptr, std::vector> const&, unsigned long)::$_1, void ()>>(std::__function::__policy_storage const*) @ 0x2ec2f441 in /usr/bin/clickhouse 28. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl>::worker(std::__list_iterator, void*>) @ 0x237d49b8 in /usr/bin/clickhouse 29. ./build_docker/./src/Common/ThreadPool.cpp:0: ThreadFromGlobalPoolImpl::ThreadFromGlobalPoolImpl>::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>(void&&)::'lambda'()::operator()() @ 0x237d8fef in /usr/bin/clickhouse 30. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 31. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse (version 23.3.19.33.altinitystable (altinity build)) 2024.03.05 09:35:42.300829 [ 696 ] {} Context: Table system.session_log is enabled. It's unreliable and may contain garbage. Do not use it for any kind of security monitoring. 2024.03.05 09:36:22.418246 [ 699 ] {957c80b4-78f0-4e8f-8ed6-197619a1dd64} executeQuery: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million: While processing (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery3: While processing 1 = ((SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery3). (TOO_MANY_ROWS) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:52248) (comment: 00175_counting_resources_in_subqueries.sql) (in query: SELECT 1 = (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID));), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp:190: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTSubquery const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ed71a in /usr/bin/clickhouse 11. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::ExecuteScalarSubqueriesMatcher::visit(std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ecd56 in /usr/bin/clickhouse 12. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 13. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 14. ./build_docker/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:100: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTFunction const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301f0845 in /usr/bin/clickhouse 15. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 16. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 17. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:83: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x30162076 in /usr/bin/clickhouse 18. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::(anonymous namespace)::executeScalarSubqueries(std::shared_ptr&, std::shared_ptr, unsigned long, std::map, std::allocator>>&, std::map, std::allocator>>&, bool, bool) @ 0x30155998 in /usr/bin/clickhouse 19. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::TreeRewriter::analyzeSelect(std::shared_ptr&, DB::TreeRewriterResult&&, DB::SelectQueryOptions const&, std::vector> const&, std::vector> const&, std::shared_ptr, bool, std::unordered_map, std::equal_to, std::allocator>>, std::unordered_map, std::equal_to, std::allocator>>) const @ 0x30150dd6 in /usr/bin/clickhouse 20. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:587: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr)::$_4::operator()(bool) const @ 0x2fcdd35c in /usr/bin/clickhouse 21. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:758: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr) @ 0x2fcd7925 in /usr/bin/clickhouse 22. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:0: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fcd226f in /usr/bin/clickhouse 23. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_if::__unique_single std::make_unique[abi:v15000] const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&>(std::shared_ptr const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&) @ 0x2fdc0288 in /usr/bin/clickhouse 24. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:40: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::shared_ptr const&, std::vector> const&) @ 0x2fdbca0e in /usr/bin/clickhouse 25. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:0: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr const&, std::shared_ptr, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fdba511 in /usr/bin/clickhouse 26. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:0: std::__unique_if::__unique_single std::make_unique[abi:v15000]&, std::shared_ptr&, DB::SelectQueryOptions const&>(std::shared_ptr&, std::shared_ptr&, DB::SelectQueryOptions const&) @ 0x2fc87ac8 in /usr/bin/clickhouse 27. ./build_docker/./src/Interpreters/InterpreterFactory.cpp:146: DB::InterpreterFactory::get(std::shared_ptr&, std::shared_ptr, DB::SelectQueryOptions const&) @ 0x2fc8617b in /usr/bin/clickhouse 28. ./build_docker/./src/Interpreters/executeQuery.cpp:663: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x3025577b in /usr/bin/clickhouse 29. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 30. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 31. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 2024.03.05 09:36:22.418486 [ 699 ] {957c80b4-78f0-4e8f-8ed6-197619a1dd64} TCPHandler: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million: While processing (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery3: While processing 1 = ((SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery3). (TOO_MANY_ROWS), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp:190: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTSubquery const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ed71a in /usr/bin/clickhouse 11. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::ExecuteScalarSubqueriesMatcher::visit(std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ecd56 in /usr/bin/clickhouse 12. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 13. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 14. ./build_docker/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:100: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTFunction const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301f0845 in /usr/bin/clickhouse 15. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 16. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 17. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:83: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x30162076 in /usr/bin/clickhouse 18. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::(anonymous namespace)::executeScalarSubqueries(std::shared_ptr&, std::shared_ptr, unsigned long, std::map, std::allocator>>&, std::map, std::allocator>>&, bool, bool) @ 0x30155998 in /usr/bin/clickhouse 19. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::TreeRewriter::analyzeSelect(std::shared_ptr&, DB::TreeRewriterResult&&, DB::SelectQueryOptions const&, std::vector> const&, std::vector> const&, std::shared_ptr, bool, std::unordered_map, std::equal_to, std::allocator>>, std::unordered_map, std::equal_to, std::allocator>>) const @ 0x30150dd6 in /usr/bin/clickhouse 20. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:587: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr)::$_4::operator()(bool) const @ 0x2fcdd35c in /usr/bin/clickhouse 21. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:758: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr) @ 0x2fcd7925 in /usr/bin/clickhouse 22. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:0: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fcd226f in /usr/bin/clickhouse 23. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_if::__unique_single std::make_unique[abi:v15000] const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&>(std::shared_ptr const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&) @ 0x2fdc0288 in /usr/bin/clickhouse 24. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:40: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::shared_ptr const&, std::vector> const&) @ 0x2fdbca0e in /usr/bin/clickhouse 25. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:0: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr const&, std::shared_ptr, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fdba511 in /usr/bin/clickhouse 26. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:0: std::__unique_if::__unique_single std::make_unique[abi:v15000]&, std::shared_ptr&, DB::SelectQueryOptions const&>(std::shared_ptr&, std::shared_ptr&, DB::SelectQueryOptions const&) @ 0x2fc87ac8 in /usr/bin/clickhouse 27. ./build_docker/./src/Interpreters/InterpreterFactory.cpp:146: DB::InterpreterFactory::get(std::shared_ptr&, std::shared_ptr, DB::SelectQueryOptions const&) @ 0x2fc8617b in /usr/bin/clickhouse 28. ./build_docker/./src/Interpreters/executeQuery.cpp:663: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x3025577b in /usr/bin/clickhouse 29. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 30. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 31. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 2024.03.05 09:36:22.478815 [ 699 ] {0802ca11-ecbb-4182-877e-7a5486156f24} executeQuery: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million. (TOO_MANY_ROWS) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:52248) (comment: 00175_counting_resources_in_subqueries.sql) (in query: SELECT 1 IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID));), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x302562a8 in /usr/bin/clickhouse 11. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 12. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 13. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 14. ./build_docker/./base/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x32b2b45b in /usr/bin/clickhouse 15. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: Poco::Net::TCPServerDispatcher::run() @ 0x32b2c436 in /usr/bin/clickhouse 16. ./build_docker/./base/poco/Foundation/src/ThreadPool.cpp:202: Poco::PooledThread::run() @ 0x32d99e05 in /usr/bin/clickhouse 17. ./build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:0: Poco::ThreadImpl::runnableEntry(void*) @ 0x32d955f5 in /usr/bin/clickhouse 18. ? @ 0x7f69c51c0609 in ? 19. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:36:22.479095 [ 699 ] {0802ca11-ecbb-4182-877e-7a5486156f24} TCPHandler: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million. (TOO_MANY_ROWS), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x302562a8 in /usr/bin/clickhouse 11. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 12. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 13. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 14. ./build_docker/./base/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x32b2b45b in /usr/bin/clickhouse 15. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: Poco::Net::TCPServerDispatcher::run() @ 0x32b2c436 in /usr/bin/clickhouse 16. ./build_docker/./base/poco/Foundation/src/ThreadPool.cpp:202: Poco::PooledThread::run() @ 0x32d99e05 in /usr/bin/clickhouse 17. ./build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:0: Poco::ThreadImpl::runnableEntry(void*) @ 0x32d955f5 in /usr/bin/clickhouse 18. ? @ 0x7f69c51c0609 in ? 19. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:36:22.531040 [ 699 ] {666ce6fd-8a97-4fb5-b89c-47a76e5010bb} executeQuery: Code: 158. DB::Exception: Limit for rows or bytes to read exceeded, max rows: 15.00 million, current rows: 17.76 million: While executing MergeTreeThread. (TOO_MANY_ROWS) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:52248) (comment: 00175_counting_resources_in_subqueries.sql) (in query: SELECT count() IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) FROM test.hits WHERE NOT ignore(AdvEngineID);), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:36:22.535127 [ 699 ] {666ce6fd-8a97-4fb5-b89c-47a76e5010bb} TCPHandler: Code: 158. DB::Exception: Limit for rows or bytes to read exceeded, max rows: 15.00 million, current rows: 17.76 million: While executing MergeTreeThread. (TOO_MANY_ROWS), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:36:22.757836 [ 699 ] {32711740-e3c4-46e0-a46e-e54170a0ca25} executeQuery: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million: While processing (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery6: While processing CounterID > ((SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery6). (TOO_MANY_ROWS) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:52248) (comment: 00175_counting_resources_in_subqueries.sql) (in query: SELECT count() FROM test.hits WHERE CounterID > (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID));), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp:190: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTSubquery const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ed71a in /usr/bin/clickhouse 11. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::ExecuteScalarSubqueriesMatcher::visit(std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ecd56 in /usr/bin/clickhouse 12. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 13. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 14. ./build_docker/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:100: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTFunction const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301f0845 in /usr/bin/clickhouse 15. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 16. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 17. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::(anonymous namespace)::executeScalarSubqueries(std::shared_ptr&, std::shared_ptr, unsigned long, std::map, std::allocator>>&, std::map, std::allocator>>&, bool, bool) @ 0x30155998 in /usr/bin/clickhouse 18. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::TreeRewriter::analyzeSelect(std::shared_ptr&, DB::TreeRewriterResult&&, DB::SelectQueryOptions const&, std::vector> const&, std::vector> const&, std::shared_ptr, bool, std::unordered_map, std::equal_to, std::allocator>>, std::unordered_map, std::equal_to, std::allocator>>) const @ 0x30150dd6 in /usr/bin/clickhouse 19. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:587: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr)::$_4::operator()(bool) const @ 0x2fcdd35c in /usr/bin/clickhouse 20. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:758: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr) @ 0x2fcd7925 in /usr/bin/clickhouse 21. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:0: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fcd226f in /usr/bin/clickhouse 22. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_if::__unique_single std::make_unique[abi:v15000] const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&>(std::shared_ptr const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&) @ 0x2fdc0288 in /usr/bin/clickhouse 23. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:40: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::shared_ptr const&, std::vector> const&) @ 0x2fdbca0e in /usr/bin/clickhouse 24. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:0: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr const&, std::shared_ptr, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fdba511 in /usr/bin/clickhouse 25. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:0: std::__unique_if::__unique_single std::make_unique[abi:v15000]&, std::shared_ptr&, DB::SelectQueryOptions const&>(std::shared_ptr&, std::shared_ptr&, DB::SelectQueryOptions const&) @ 0x2fc87ac8 in /usr/bin/clickhouse 26. ./build_docker/./src/Interpreters/InterpreterFactory.cpp:146: DB::InterpreterFactory::get(std::shared_ptr&, std::shared_ptr, DB::SelectQueryOptions const&) @ 0x2fc8617b in /usr/bin/clickhouse 27. ./build_docker/./src/Interpreters/executeQuery.cpp:663: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x3025577b in /usr/bin/clickhouse 28. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 29. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 30. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 31. ./build_docker/./base/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x32b2b45b in /usr/bin/clickhouse 2024.03.05 09:36:22.758105 [ 699 ] {32711740-e3c4-46e0-a46e-e54170a0ca25} TCPHandler: Code: 158. DB::Exception: Limit for rows (controlled by 'max_rows_to_read' setting) exceeded, max rows: 1.00 million, current rows: 8.88 million: While processing (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery6: While processing CounterID > ((SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) AS _subquery6). (TOO_MANY_ROWS), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::AnalysisResult::checkLimits(DB::Settings const&, DB::SelectQueryInfo const&) const @ 0x31e1f19f in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1639: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x31e35054 in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/QueryPlan/ISourceStep.cpp:24: DB::ISourceStep::updatePipeline(std::vector>, std::allocator>>>, DB::BuildQueryPipelineSettings const&) @ 0x31de5ae7 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:296: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x31e0f6bc in /usr/bin/clickhouse 9. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x2fdbf305 in /usr/bin/clickhouse 10. ./build_docker/./src/Interpreters/ExecuteScalarSubqueriesVisitor.cpp:190: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTSubquery const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ed71a in /usr/bin/clickhouse 11. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:815: DB::ExecuteScalarSubqueriesMatcher::visit(std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301ecd56 in /usr/bin/clickhouse 12. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 13. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 14. ./build_docker/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:100: DB::ExecuteScalarSubqueriesMatcher::visit(DB::ASTFunction const&, std::shared_ptr&, DB::ExecuteScalarSubqueriesMatcher::Data&) @ 0x301f0845 in /usr/bin/clickhouse 15. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:78: DB::InDepthNodeVisitor>::doVisit(std::shared_ptr&) @ 0x30161be7 in /usr/bin/clickhouse 16. ./build_docker/./src/Interpreters/InDepthNodeVisitor.h:64: void DB::InDepthNodeVisitor>::visitChildren(std::shared_ptr&) @ 0x3016206b in /usr/bin/clickhouse 17. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::(anonymous namespace)::executeScalarSubqueries(std::shared_ptr&, std::shared_ptr, unsigned long, std::map, std::allocator>>&, std::map, std::allocator>>&, bool, bool) @ 0x30155998 in /usr/bin/clickhouse 18. ./build_docker/./src/Interpreters/TreeRewriter.cpp:0: DB::TreeRewriter::analyzeSelect(std::shared_ptr&, DB::TreeRewriterResult&&, DB::SelectQueryOptions const&, std::vector> const&, std::vector> const&, std::shared_ptr, bool, std::unordered_map, std::equal_to, std::allocator>>, std::unordered_map, std::equal_to, std::allocator>>) const @ 0x30150dd6 in /usr/bin/clickhouse 19. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:587: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr)::$_4::operator()(bool) const @ 0x2fcdd35c in /usr/bin/clickhouse 20. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:758: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, std::optional, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&, std::shared_ptr const&, std::shared_ptr) @ 0x2fcd7925 in /usr/bin/clickhouse 21. ./build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:0: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr const&, std::shared_ptr const&, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fcd226f in /usr/bin/clickhouse 22. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: std::__unique_if::__unique_single std::make_unique[abi:v15000] const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&>(std::shared_ptr const&, std::shared_ptr&, DB::SelectQueryOptions&, std::vector> const&) @ 0x2fdc0288 in /usr/bin/clickhouse 23. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:40: DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter(std::shared_ptr const&, std::vector> const&) @ 0x2fdbca0e in /usr/bin/clickhouse 24. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:0: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr const&, std::shared_ptr, DB::SelectQueryOptions const&, std::vector> const&) @ 0x2fdba511 in /usr/bin/clickhouse 25. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:0: std::__unique_if::__unique_single std::make_unique[abi:v15000]&, std::shared_ptr&, DB::SelectQueryOptions const&>(std::shared_ptr&, std::shared_ptr&, DB::SelectQueryOptions const&) @ 0x2fc87ac8 in /usr/bin/clickhouse 26. ./build_docker/./src/Interpreters/InterpreterFactory.cpp:146: DB::InterpreterFactory::get(std::shared_ptr&, std::shared_ptr, DB::SelectQueryOptions const&) @ 0x2fc8617b in /usr/bin/clickhouse 27. ./build_docker/./src/Interpreters/executeQuery.cpp:663: DB::executeQueryImpl(char const*, char const*, std::shared_ptr, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x3025577b in /usr/bin/clickhouse 28. ./build_docker/./src/Interpreters/executeQuery.cpp:1160: DB::executeQuery(String const&, std::shared_ptr, bool, DB::QueryProcessingStage::Enum) @ 0x3025198c in /usr/bin/clickhouse 29. ./build_docker/./src/Server/TCPHandler.cpp:420: DB::TCPHandler::runImpl() @ 0x3166d7b0 in /usr/bin/clickhouse 30. ./build_docker/./src/Server/TCPHandler.cpp:2079: DB::TCPHandler::run() @ 0x316929b6 in /usr/bin/clickhouse 31. ./build_docker/./base/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x32b2b45b in /usr/bin/clickhouse 2024.03.05 09:36:22.787473 [ 699 ] {7d372f41-aa74-4f22-8045-8c2f89990110} executeQuery: Code: 158. DB::Exception: Limit for rows or bytes to read exceeded, max rows: 10.00 million, current rows: 13.12 million: While executing MergeTreeThread. (TOO_MANY_ROWS) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:52248) (comment: 00175_counting_resources_in_subqueries.sql) (in query: SELECT count() FROM test.hits WHERE CounterID < (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID));), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:36:22.788624 [ 699 ] {7d372f41-aa74-4f22-8045-8c2f89990110} TCPHandler: Code: 158. DB::Exception: Limit for rows or bytes to read exceeded, max rows: 10.00 million, current rows: 13.12 million: While executing MergeTreeThread. (TOO_MANY_ROWS), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, String&&, String&&) @ 0x2e8dc16b in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:0: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dbf4a in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:37:31.859468 [ 1728 ] {2bd16c5d-7951-4b0f-8e2f-0cee17b612e7} executeQuery: Code: 307. DB::Exception: Limit for rows or bytes to read exceeded, max bytes: 572.20 MiB, current bytes: 588.38 MiB: While executing MergeTreeThread. (TOO_MANY_BYTES) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:45958) (comment: 00091_prewhere_two_conditions.sql) (in query: SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00';), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, ReadableSize&&, ReadableSize&&) @ 0x2e8dc2cf in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:36: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dc021 in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:37:31.861538 [ 1728 ] {2bd16c5d-7951-4b0f-8e2f-0cee17b612e7} TCPHandler: Code: 307. DB::Exception: Limit for rows or bytes to read exceeded, max bytes: 572.20 MiB, current bytes: 588.38 MiB: While executing MergeTreeThread. (TOO_MANY_BYTES), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, ReadableSize&&, ReadableSize&&) @ 0x2e8dc2cf in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:36: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dc021 in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:37:31.952397 [ 1728 ] {46d89644-b949-42f7-9c97-acdd48c4d5b5} executeQuery: Code: 307. DB::Exception: Limit for rows or bytes to read exceeded, max bytes: 572.20 MiB, current bytes: 591.71 MiB: While executing MergeTreeThread. (TOO_MANY_BYTES) (version 23.3.19.33.altinitystable (altinity build)) (from [::1]:45958) (comment: 00091_prewhere_two_conditions.sql) (in query: SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00';), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, ReadableSize&&, ReadableSize&&) @ 0x2e8dc2cf in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:36: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dc021 in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ? 2024.03.05 09:37:31.954211 [ 1728 ] {46d89644-b949-42f7-9c97-acdd48c4d5b5} TCPHandler: Code: 307. DB::Exception: Limit for rows or bytes to read exceeded, max bytes: 572.20 MiB, current bytes: 591.71 MiB: While executing MergeTreeThread. (TOO_MANY_BYTES), Stack trace (when copying this message, always include the lines below): 0. std::exception::capture() @ 0x18ca886c in /usr/bin/clickhouse 1. ./build_docker/./base/poco/Foundation/src/Exception.cpp:28: Poco::Exception::Exception(String const&, int) @ 0x32cf0b83 in /usr/bin/clickhouse 2. ./build_docker/./src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x236c158b in /usr/bin/clickhouse 3. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::Exception::Exception(int, FormatStringHelperImpl::type, std::type_identity::type, std::type_identity::type>, char const*&, ReadableSize&&, ReadableSize&&) @ 0x2e8dc2cf in /usr/bin/clickhouse 4. ./build_docker/./src/QueryPipeline/SizeLimits.cpp:36: DB::SizeLimits::check(unsigned long, unsigned long, char const*, int, int) const @ 0x2e8dc021 in /usr/bin/clickhouse 5. ./build_docker/./src/QueryPipeline/ReadProgressCallback.cpp:97: DB::ReadProgressCallback::onProgress(unsigned long, unsigned long, std::list> const&) @ 0x2e8c4b1d in /usr/bin/clickhouse 6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:59: DB::ExecutionThreadContext::executeTask() @ 0x3170c4bb in /usr/bin/clickhouse 7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic*) @ 0x316fbdc3 in /usr/bin/clickhouse 8. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: void std::__function::__policy_invoker::__call_impl::ThreadFromGlobalPoolImpl(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x316fd41f in /usr/bin/clickhouse 9. ./build_docker/./base/base/../base/wide_integer_impl.h:789: ThreadPoolImpl::worker(std::__list_iterator) @ 0x237d27d8 in /usr/bin/clickhouse 10. ./build_docker/./src/Common/ThreadPool.cpp:0: void* std::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::function, long, std::optional, bool)::'lambda0'()>>(void*) @ 0x237d6624 in /usr/bin/clickhouse 11. ? @ 0x7f69c51c0609 in ? 12. clone @ 0x7f69c50e5353 in ?