Skip to main content
Skip table of contents

Limiting Memory Usage

Typically the process memory usage will grow and not shrink unless there is enough pressure for the .NET garbage collector to release unused memory back to the operating system. This is due to memory allocations being an expensive operation.

This can become a problem on systems where other critical services compete for finite memory resources - especially when EzeScan REST Sync is configured to fetch large CSV files from SFTP as the entire file must be allocated to memory (unlike local files that can be streamed).

To overcome this issue we can apply an override to EzeScan.RestSync.runtimeconfig.json to force the .NET garbage collector to aggressively releasing unused memory when the overall system memory is above a given a percentage. In The example below we are setting System.GC.HighMemoryPercent option to 60%.

image-20240508-230714.png

EzeScan.RestSync.runtimeconfig.json

Setting the threshold too low can negatively impact the performance due to frequent memory allocations and deallocations.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.