I am uploading 9-11 mb file and storing in mongo db in fs.chunks through api test case. in first 5-7 attempts it will work fine after that mongo db get shut down.
err is comming while running this command
18-11-27T10:57:08.278+0000 I COMMAND [conn46] command abc_itt.fs.chunks command: insert { insert: "fs.chunks", ordered: true, lsid:
, $db: "abc_itt" } ninserted:1 keysInserted:2 numYields:0 reslen:44 locks:{ Global: { acquireCount:
{ r: 1, w: 1 }}, Database: { acquireCount:
{ w: 1 }}, Collection: { acquireCount:
{ w: 1 }} } protocol:op_query 427ms
in console i m getting "{"message":"getClientDb: Error - ","name":"MongoNetworkError","stack":"MongoNetworkError: failed to reconnect after 30 attempts with interval 1000 ms\n at Connection.<anonymous> (/opt/mount1/cartos/main/node_modules/mongodb-core/lib/connection/pool.js:363:13)\n at emitTwo (events.js:106:13)\n at Connection.emit (events.js:191:7)\n at Socket.<anonymous> (/opt/mount1/cartos/main/node_modules/mongodb-core/lib/connection/connection.js:245:50)\n at Socket.g (events.js:292:16)\n at emitOne (events.js:96:13)\n at Socket.emit (events.js:188:7)\n at emitErrorNT (net.js:1281:8)\n at combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickDomainCallback (internal/process/next_tick.js:128:9)","errorLabels":["TransientTransactionError"],"_error_callsites":[{},{},{},{},{},{},{},{},{},{}],"level":"error","timestamp":"2018-11-27T09:15:00.566Z"}"
then "{"message":"getClientDb: Error - ","name":"MongoError","stack":"MongoError: Topology was destroyed\n at nextFunction (/opt/mount1/cartos/main/node_modules/mongodb-core/lib/cursor.js:603:27)\n at Cursor.next (/opt/mount1/cartos/main/node_modules/mongodb-core/lib/cursor.js:824:3)\n at Cursor.next (/opt/mount1/cartos/main/node_modules/mongodb/lib/cursor.js:211:36)\n at fetchDocs (/opt/mount1/cartos/main/node_modules/mongodb/lib/operations/cursor_ops.js:211:12)\n at toArray (/opt/mount1/cartos/main/node_modules/mongodb/lib/operations/cursor_ops.js:241:3)\n at executeOperation (/opt/mount1/cartos/main/node_modules/mongodb/lib/utils.js:420:24)\n at Cursor.toArray (/opt/mount1/cartos/main/node_modules/mongodb/lib/cursor.js:818:10)\n at MongoNativeClientManager.getConnection (/opt/mount1/cartos/main/dbLayer/connectionManager/mongoNativeClientManager.js:22:88)\n at BucketApiStorageService.save (/opt/mount1/cartos/main/server/documentStorage/bucketApiStorageService.js:19:29)\n at Object.savedActualImg (/opt/mount1/cartos/main/server/media/MediaHelper.js:58:38)\n at /opt/mount1/cartos/main/node_modules/async/lib/async.js:580:25\n at /opt/mount1/cartos/main/node_modules/async/lib/async.js:122:13\n at _each (/opt/mount1/cartos/main/node_modules/async/lib/async.js:46:13)\n at Object.async.each (/opt/mount1/cartos/main/node_modules/async/lib/async.js:121:9)\n at _parallel (/opt/mount1/cartos/main/node_modules/async/lib/async.js:579:20)\n at Object.async.parallel (/opt/mount1/cartos/main/node_modules/async/lib/async.js:595:9)","_error_callsites":[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],"level":"error","timestamp":"2018-11-27T09:15:18.207Z"}"
and mongo db shuts down, need to again restart then same thing happening
I have 1 tier architecture on server with 8 GB ram 4 cpu