Question: Suppose your aggregation pipeline terminated with an exception referring to exceeded memory limit. What is the best way to resolve the issue?

  1. Set useMemory to twice amount indicated in exception.
  2. Switch a 64 bit instance of MongoDB.
  3. Increase the memory of the MongoDB server.
  4. Set allowDiskUse to true.

Answer: The correct answer of the above question is Option D:Set allowDiskUse to true.