Hey @yashdeep_hinge,
Welcome to the MongoDB Community forums!
Could you share the aggregation pipeline you are executing dynamically and the sample dataset after omitting the sensitive information?
Could you share the error log you’ve encountered, and the frequency of timeouts, and explain how you arrived at the conclusion that 24 million documents are responsible for timeouts?
In my opinion, there could be a couple of reasons, including slow hardware or poor query performance. However, to gain more understanding, please share the following additional information:
- The deployment configuration such as MongoDB version, hardware specs of servers, etc.
- How are you running MongoDB - directly on servers, in Docker containers, Kubernetes? This could impact resource usage.
Look forward to hearing from you.
Regards,
Kushagra