Schema sampling fails due to sort memory limit exceeded, how to add allowDiskUse:true

Hi @michael_hoeller,

A Compass engineer confirmed allowDiskUse is enabled for sampling (checked Compass code and via server logging), and wasn’t able to reproduce this issue with Compass 1.28.1.

Can you share some more information about the deployment you are querying:

  • Is this on-premises or Atlas?
  • Are you using a standalone, replica set, or sharded cluster connection?
  • If Atlas, what cluster tier are you using?

Also, what is the average size of documents for this collection? It sounds like this is a similar sampling issue to Chart get's a timeout - how to debug?, where the average document size was problematic. A similar workaround (sampling from a view of the collection with fewer fields) may also be helpful.

Regards,
Stennie