digital-sustainability / oss-github-benchmark

Benchmark of OSS projects on GitHub
GNU General Public License v3.0
12 stars 18 forks source link

Fix for memory limit issue by opting in to external sorting #347

Closed Alexandre-DSL closed 2 months ago

Alexandre-DSL commented 2 months ago

To fix the following error while looking institutions with a lot of repositories (ie. EPFL and CampToCamp):

MongoServerError: 
PlanExecutor error during aggregation :: caused by :: 
Sort exceeded memory limit of 33554432 bytes, 
but did not opt in to external sorting.   
    at Connection.onMessage (/dist/node_modules/mongodb/lib/cmap/connection.js:210:30)
    at MessageStream.<anonymous> (/dist/node_modules/mongodb/lib/cmap/connection.js:63:60)
    at MessageStream.emit (node:events:514:28)
    at processIncomingData (/dist/node_modules/mongodb/lib/cmap/message_stream.js:132:20)
    at MessageStream._write (/dist/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
    at writeOrBuffer (node:internal/streams/writable:399:12)
    at _write (node:internal/streams/writable:340:10)
    at Writable.write (node:internal/streams/writable:344:10)
    at TLSSocket.ondata (node:internal/streams/readable:785:22)
    at TLSSocket.emit (node:events:514:28)