[SOLVED] Cannot create Backup due to Mongo Ram Limit

I have…

  • [x] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

On my self hosted squidex installation, i cannot create a backup of my app.
Log output:

Command find failed: Executor error during find command :: caused by :: Sort 
operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller 

Expected behavior

Creation of backup should work :smiley:

Minimal reproduction of the problem

Well, i created many exports of Squidex Apps (on other Instances). The difference is that the App experiencing the Ram limit issue has way more assets than the others
Cannot really tell how to reproduce^^


  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [4.1.3] // 4.2.0 also tested


  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge


Can you post the full exception with the stacktrace

  "logLevel": "Error",
  "action": "makeBackup",
  "status": "failed",
  "backupId": "62111182-18ae-4b1e-8179-5a912caac0da",
  "app": {
    "name": "Squidex",
    "version": "",
    "sessionId": "b12e53db-5def-4dce-82ab-3ea3df2cb4bc"
  "timestamp": "2020-04-22T19:30:27Z",
  "exception": {
    "type": "MongoDB.Driver.MongoCommandException",
    "message": "Command find failed: Executor error during find command :: caused by :: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit..",
stackTrace": "at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol\u00601.ProcessResponse(ConnectionId connectionId, CommandMessage responseMessage)\n   at MongoDB.Driver.Core.WireProtocol.CommandUsingCommandMessageWireProtocol\u00601.ExecuteAsync(IConnection connection, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Servers.Server.ServerChannel.ExecuteProtocolAsync[TResult](IWireProtocol\u00601 protocol, ICoreSession session, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Operations.RetryableReadOperationExecutor.ExecuteAsync[TResult](IRetryableReadOperation\u00601 operation, RetryableReadContext context, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Operations.ReadCommandOperation\u00601.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Operations.FindCommandOperation\u00601.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Operations.FindOperation\u00601.ExecuteAsync(RetryableReadContext context, CancellationToken cancellationToken)\n   at MongoDB.Driver.Core.Operations.FindOperation\u00601.ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)\n   at MongoDB.Driver.OperationExecutor.ExecuteReadOperationAsync[TResult](IReadBinding binding, IReadOperation\u00601 operation, CancellationToken cancellationToken)\n   at MongoDB.Driver.MongoCollectionImpl\u00601.ExecuteReadOperationAsync[TResult](IClientSessionHandle session, IReadOperation\u00601 operation, ReadPreference readPreference, CancellationToken cancellationToken)\n   at MongoDB.Driver.MongoCollectionImpl\u00601.UsingImplicitSessionAsync[TResult](Func\u00602 funcAsync, CancellationToken cancellationToken)\n   at Squidex.Infrastructure.MongoDb.MongoExtensions.ForEachPipelineAsync[TDocument](IAsyncCursorSource\u00601 source, Func\u00602 processor, CancellationToken cancellationToken) in /src/src/Squidex.Infrastructure.MongoDb/MongoDb/MongoExtensions.cs:line 183\n   at Squidex.Infrastructure.EventSourcing.MongoEventStore.QueryAsync(Func\u00602 callback, StreamPosition lastPosition, FilterDefinition\u00601 filterDefinition, EventPredicate filterExpression, CancellationToken ct) in /src/src/Squidex.Infrastructure.MongoDb/EventSourcing/MongoEventStore_Reader.cs:line 187\n   at Squidex.Domain.Apps.Entities.Backup.BackupGrain.ProcessAsync(BackupJob job, RefToken actor, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Backup/BackupGrain.cs:line 163"
1 Like

Hi, I have ensure that there is a index.

thank you. It works now :slight_smile:

1 Like

Deployed to the cloud.