Warning Memory Limit
- Last UpdatedJun 06, 2024
- 1 minute read
Warning Memory Limit of a service is the memory size of the process. At this size, the process can be on the verge of failure (OutOfMemoryException). If the memory size increases to a higher extent, the process can enter the phase of Critical Memory Limit. To avoid this, the process can be restarted when its load is less, probably during night time.
Process should be in warning memory phase for a specified duration (WarningTimeLimitInMinutes). Only then the service will be restarted. In addition, the warning memory limit is reached at the specified RestartAt time.
Configuration:
<WarningMemory MemoryLimitInMB="500" TimeLimitInMinutes="10"
RestartAt="01:00"/>
The above configuration means that if the process has reached the memory of 500MB at 1AM and it was 500MB for more than 10 minutes, only then the service is restarted.
All the three attributes are mandatory fields.
To disable Warning Memory monitoring, the above node should be deleted or commented.