huggingface/Mongoku

Mongoku causes a crash of MongoDB cluster with 700GB of data

b0tm1nd opened this issue · 0 comments

When starting shows a successful connection message and hangs:

# npx mongoku start
  __  __                         _          
 |  \/  | ___  _ __   __ _  ___ | | ___   _ 
 | |\/| |/ _ \| '_ \ / _` |/ _ \| |/ / | | |
 | |  | | (_) | | | | (_| | (_) |   <| |_| |
 |_|  |_|\___/|_| |_|\__, |\___/|_|\_\\__,_|
                     |___/                  
[Mongoku] Starting...
(node:489433) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(Use `node --trace-warnings ...` to show where the warning was created)
[localhost:27017] Connected to localhost:27017

Then by analyzing
# systemctl status mongod
Memory usage of MongoDB starts to rapidly increase and crashes in about a minute.

After restart, the next error message appears at mongoku terminal:

MongoError: pool is draining, new operations prohibited
    at Pool.write (/usr/our/app/node_modules/mongodb/lib/core/connection/pool.js:849:8)
    at _command (/usr/our/app/node_modules/mongodb/lib/core/wireprotocol/command.js:149:10)
    at Object.command (/usr/our/app/node_modules/mongodb/lib/core/wireprotocol/command.js:28:5)
    at Server.command (/usr/our/app/node_modules/mongodb/lib/core/topologies/server.js:637:16)
    at ListCollectionsOperation.executeCommand (/usr/our/app/node_modules/mongodb/lib/operations/command_v2.js:101:12)
    at ListCollectionsOperation.execute (/usr/our/app/node_modules/mongodb/lib/operations/list_collections.js:96:18)
    at /usr/our/app/node_modules/mongodb/lib/operations/execute_operation.js:144:17
    at Server.selectServer (/usr/our/app/node_modules/mongodb/lib/core/topologies/server.js:837:3)
    at Server.selectServer (/usr/our/app/node_modules/mongodb/lib/topologies/topology_base.js:342:32)
    at executeWithServerSelection (/usr/our/app/node_modules/mongodb/lib/operations/execute_operation.js:131:12)
[Mongoku] listening on port 3100

And on the web all you can see is "Loading..." in the servers section.