In large or high-throughput Riva environments, the Riva Sync Service may run continuously for extended periods while processing a significant volume of sync activity. While the service is designed for long-running operation, some customers choose to configure a controlled, scheduled daily restart as a proactive stability measure.
A scheduled restart can help:
- Release accumulated memory and system resources.
- Reset long-running execution state.
- Maintain consistent performance in busy environments.
- Reduce the likelihood of degradation over extended uptime.
This configuration is optional and is not required for most deployments. It should be considered only when operating at scale or when advised by Riva Technical Support.
When a Scheduled Restart Makes Sense
You may consider enabling a scheduled restart if your environment meets one or more of the following criteria:
- A large number of active sync policies.
- High concurrency or frequent sync cycles.
- Continuous 24×7 operation with minimal maintenance windows
- Observed performance degradation after extended service uptime.
- Operational preference for periodic service recycling as a preventative measure.
This approach is commonly used in mature, high-volume environments as part of general service hygiene.
How the Schedule Restart Works
Riva includes an advanced configuration option that allows the Sync Service to gracefully exit at a defined time each day.
When enabled:
- The Riva Sync Service terminates its process at the configured time.
- Windows Service Recovery settings automatically restart the service
- Normal sync operations resume after the restart.
This mechanism relies on standard Windows service behavior and does not require external schedulers or scripts.
Enabling a Daily Scheduled Restart
Step 1 - Locate the Configuration File
On the Riva server, identify the correct agent configuration file. In most modern deployments, this will be: Omni.Riva.CrmAgentEx.exe.config.
This file is located in the Riva runtime directory, typically under: Riva\Application\RunTime.
If multiple Riva agent services are installed, ensure you are modifying the configuration file associated with the correct service instance.
Step 2 - Update the AppSettings
Open the .config file using a text editor run as Administrator.
Within the <appSettings> section, add or update the following keys:
<add key="Sync.Crm.ForceExit" value="True" />
<add key="Sync.Crm.ForceExitTime" value="04:15" />Configuration options:
-
Sync.Crm.ForceExit
True- Enables the scheduled restartFalse- Disables the scheduled restart
-
Sync.Crm.ForceExitTime
The local server time (24-hour format) when the service will exit.
Recommended to choose a low-activity period like scheduled Blackout hours.
If not specified, the default restart time is 03:00 local time.
Step 3 - Save and Restart the Servicee
Save the configuration file.
Restart the Riva Sync Service to apply the change.
The scheduled restart will occur automatically at the configured time going forward.
Required Windows Service Recovery Settings
For the scheduled restart to function correctly, the Windows service must be configured to restart automatically.
In Services → Riva Sync Service → Properties → Recovery:
First failure: Restart the Service
Second failure: Restart the Service
Subsequent failures: Restart the Service
These settings ensure the service restarts immediately after the scheduled exit.
Verification
To verify correct behavior:
Monitor the service at the configured restart time.
Confirm the service stops and restarts automatically.
Review Riva logs for entries indicating service shutdown and startup.
Confirm sync activity resumes normally after the restart.
If the service does not restart, re-validate:
The restart time format.
The service recovery configuration.
The service account permissions.
Important Notes
This configuration is not a fix for underlying performance or configuration issues.
If frequent restarts are required to maintain stability, Riva Technical Support should review the environment.
Scheduled restarts should be coordinated with maintenance windows where possible.