Set an upper time limit for aggregation pipelines in MongoDB Compass using the Max Time MS option to manage query execution time.