Skip to content

mongodb view: Exceeded memory limit for $group, but didn't allow external sort #72718

@filimonov

Description

@filimonov
[dcaldd906] 2024.12.02 10:35:14.319074 [ 1415362 ] {e31f10ae-ae26-41b3-a015-cbe8abb019ab} <Error> executeQuery: std::exception. Code: 1001, type: mongocxx::v_noabi::query_exception, e.what() = PlanExecutor error during aggregation :: caused by :: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in.: generic server error (version 24.10.2.80 (official build)) (from 127.0.0.1:37038) (in query: SELECT * FROM mongodb('....:27017', 'db', 'view', 'user', '[HIDDEN]', 'DemoNumber String', 'allowDiskUse=true') LIMIT 1), Stack trace (when copying this message, always include the lines below):
 
0. ./contrib/llvm-project/libcxx/include/string:1499: std::system_error::system_error(std::error_code, String const&) @ 0x0000000017afc2d5
1. ./contrib/mongo-cxx-driver/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/exception.hpp:31: void mongocxx::v_noabi::throw_exception<mongocxx::v_noabi::query_exception>(bsoncxx::v_noabi::document::value, _bson_error_t const&) @ 0x00000000156ffe1b
2. ./build_docker/./contrib/mongo-cxx-driver/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp:53: mongocxx::v_noabi::cursor::iterator::operator++() @ 0x0000000015701662
3. ./contrib/mongo-cxx-driver/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/cursor.cpp:80: DB::MongoDBSource::generate() @ 0x0000000012cecac7
4. ./build_docker/./src/Processors/ISource.cpp:139: DB::ISource::tryGenerate() @ 0x00000000129a8b1b
5. ./build_docker/./src/Processors/ISource.cpp:108: DB::ISource::work() @ 0x00000000129a8827
6. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:47: DB::ExecutionThreadContext::executeTask() @ 0x00000000129c2fa7
7. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:289: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x00000000129b6550
8. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:255: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x00000000129b5824
9. ./build_docker/./src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:83: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x00000000129c6a8a
10. ./contrib/llvm-project/libcxx/include/__functional/function.h:848: ? @ 0x000000000d04c0bf
11. ./contrib/llvm-project/libcxx/include/__functional/invoke.h:359: ? @ 0x000000000d052f5a
12. start_thread @ 0x00000000000081cf
13. __GI___clone @ 0x0000000000039dd3
 
 
Elapsed: 1.005 sec.
 
Received exception from server (version 24.10.2):

Code: 1001. DB::Exception: Received from localhost:9000. DB::Exception: mongocxx::v_noabi::query_exception: PlanExecutor error during aggregation :: caused by :: Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt in.: generic server error. (STD_EXCEPTION)

Is there a way to enable allowDiskUse:true?

Metadata

Metadata

Assignees

No one assigned

    Labels

    unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions