Showing posts with label mongoDB. Show all posts
Showing posts with label mongoDB. Show all posts

Friday, June 2, 2023

[DevOps] Debug MongoDB pipelines

Sometime, MongoDB server is crash when tried to run some pipelines (aggregations). The main problem – it's happens without logs and hardly to detect it and debug. 

For debugging, you can use this command in MongoDB client for getting latest logs before crash and for detecting what aggregation is evoking error.

db.adminCommand( { getLog:"global" })

This command requires some additional admin permissions for getting logs and not available for regular users