- 4 minutes to read

CleanUpTimerInterval – System Parameter

Control how frequently the Nodinite Logging Service performs maintenance operations with the CleanUpTimerInterval system parameter. This setting determines how often old events and data are deleted to keep your system running efficiently.

What you'll achieve with this parameter:

  • Control maintenance frequency for optimal performance
  • Automate deletion of old events based on retention policies
  • Balance system load by adjusting cleanup intervals
  • Changes apply automatically without service restart

The CleanUpTimerInterval System Parameter defines the timer interval (in milliseconds) for the Logging Service to execute its maintenance operations. During each cycle, the service deletes old events and data according to configured retention policies such as DaysToKeepMessageEventsDefault, DaysToKeepMessageDataDefault, and DaysToKeepMessageContextDefault.

System Parameter Name Data Type Values/Example Comment
CleanUpTimerInterval integer 3600000 Default = 3600000 ms (1 hour). Minimum recommended: 300000 ms (5 minutes).

The Logging Service uses the MaintenanceBackgroundService to perform cleanup operations at the configured interval. This background service monitors the system parameter and automatically picks up changes without requiring a service restart.

Note

Changes to this parameter are detected automatically by the Logging Service on the next execution cycle. You do NOT need to restart the service for the new value to take effect.


How It Works

The Logging Service performs the following maintenance operations during each cleanup cycle:

  1. Delete Old Events - Removes Log Events that exceed retention periods defined in Message Types
  2. Delete Old Data - Removes message bodies/payloads that exceed the DaysToKeepMessageDataDefault retention period
  3. Delete Old Context - Removes context properties that exceed the DaysToKeepMessageContextDefault retention period
  4. Delete Error Events Without Data - Removes error events without data based on DaysToKeepErrorEventsWithoutData
  5. Delete Old Log Audits - Removes audit records based on DaysToKeepLogAudits
  6. Delete Old Monitor Events - Removes monitoring events based on DaysToKeepMonitorEvents

Performance Considerations

The cleanup timer interval should be configured based on your system's workload and performance requirements:

  • High-Volume Environments: Consider increasing the interval (e.g., 2-4 hours) to reduce overhead during peak processing times
  • Low-Volume Environments: Use the default 1-hour interval for regular maintenance
  • Storage-Constrained Environments: Consider decreasing the interval (e.g., 30 minutes) to ensure faster cleanup and prevent disk space issues

Warning

Setting the interval too low (e.g., less than 5 minutes) may cause excessive database load and impact processing performance.


Frequently Asked Questions

Find more solutions and answers in the Nodinite System Parameters FAQ, as well as the Troubleshooting user guide.

How do I change the value?

You can modify the CleanUpTimerInterval in multiple ways:

  1. Admin UI: Via the System Parameters section (recommended method - see 'How do I change the System Parameters')
  2. Web API: Using the endpoint PUT /api/SystemParameters/CleanUpTimerInterval
  3. Database: Direct update in the SystemParameters table (not recommended)

Do I need to restart anything?

No! The Logging Service uses IOptionsMonitor to detect configuration changes dynamically. When you change the CleanUpTimerInterval value, the service will pick up the new value on the next execution cycle without requiring a restart. This ensures minimal disruption and maximum agility.

What happens if cleanup takes longer than the interval?

The Logging Service will wait for the current cleanup operation to complete before starting the next cycle. If cleanup operations consistently take longer than the configured interval, consider increasing the interval or reviewing your retention policies to reduce the workload.

How do I know if cleanup is running?

Monitor the Logging Service performance and activity through:

  1. Windows Event Log entries from the Logging Service
  2. SQL Server activity on the Log Databases
  3. The Administration overview in the Web Client for service status

The default value of 3600000 ms (1 hour) is recommended for most environments. This provides a good balance between:

  • Regular maintenance to prevent data accumulation
  • Minimal performance impact on production workloads
  • Efficient resource utilization

Adjust based on your specific workload patterns and storage constraints.


Next Step

Logging Service
DaysToKeepMessageEventsDefault
DaysToKeepMessageDataDefault
Administration