diff --git a/backend/src/Squidex.Infrastructure/Dump/Dumper.cs b/backend/src/Squidex.Infrastructure/Dump/Dumper.cs index c9cc7c9e6..4cc2c6d6c 100644 --- a/backend/src/Squidex.Infrastructure/Dump/Dumper.cs +++ b/backend/src/Squidex.Infrastructure/Dump/Dumper.cs @@ -32,7 +32,7 @@ namespace Squidex.Infrastructure.Dump public Task InitializeAsync( CancellationToken ct) { - if (options.DumpLimit > 0 || options.GCDumpLimit > 0) + if (options.DumTrigger > 0 || options.GCDumpTrigger > 0) { timer = new Timer(CollectDump); timer.Change(TimeSpan.Zero, TimeSpan.FromSeconds(5)); @@ -70,12 +70,12 @@ namespace Squidex.Infrastructure.Dump { var usage = GC.GetTotalMemory(false) / (1024 * 1024); - if (options.DumpLimit > 0 && usage > options.DumpLimit && scheduledDumpTask == null) + if (options.DumTrigger > 0 && usage > options.DumTrigger && scheduledDumpTask == null) { scheduledDumpTask = CreateDumpAsync(); } - if (options.GCDumpLimit > 0 && usage > options.GCDumpLimit && scheduledGcDumpTask == null) + if (options.GCDumpTrigger > 0 && usage > options.GCDumpTrigger && scheduledGcDumpTask == null) { scheduledGcDumpTask = CreateGCDumpAsync(); } diff --git a/backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs b/backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs index 09443a172..3386f9f2f 100644 --- a/backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs +++ b/backend/src/Squidex.Infrastructure/Dump/DumperOptions.cs @@ -13,8 +13,8 @@ namespace Squidex.Infrastructure.Dump public string? DumpTool { get; set; } - public int GCDumpLimit { get; set; } + public int GCDumpTrigger { get; set; } - public int DumpLimit { get; set; } + public int DumTrigger { get; set; } } } diff --git a/backend/src/Squidex/appsettings.json b/backend/src/Squidex/appsettings.json index bca9b8124..6c43c64d9 100644 --- a/backend/src/Squidex/appsettings.json +++ b/backend/src/Squidex/appsettings.json @@ -319,6 +319,24 @@ } }, + "diagnostics": { + // The path to the dotnet-dump tool binary. + // + // REMARKS: Will be set automatically in the official Docker image. + "dumpTool": "", + + // When more memory is allocated that the defined value (in MB) a dump will be created once automatically and written to the asset store. + "dumpTrigger": 0, + + // The path to the dotnet-gcdump tool binary. + // + // REMARKS: Will be set automatically in the official Docker image. + "gcdumpTool": "", + + // When more memory is allocated than the defined value (in MB) a gcdump will be created once automatically and written to the asset store. + "gcumpTrigger": 0 + }, + "assetStore": { // Define the type of the read store. //