If you ever find yourself dealing with a Linx server that keeps crashing, you can configure Windows Service Control Manager to automatically restart the service with intelligent retry logic.
The Solution
Use this Windows command to configure automatic restart behavior:
cmd
sc.exe failure "LinxServer6" actions= restart/30000/restart/120000/restart/600000 reset= 86400
IMPORTANT SAFETY NOTE: Always understand what a command does before executing it in the terminal. This is a Windows CMD/PowerShell command that requires administrative permissions to modify service recovery settings.
What This Command Does
The sc.exe failure command configures the service recovery actions with the following behavior:
- First failure: Restart after 30 seconds (30000 milliseconds)
- Second failure: Restart after 2 minutes (120000 milliseconds)
- Third failure: Restart after 10 minutes (600000 milliseconds)
- All subsequent failures: Continue restarting every 10 minutes
- Reset counter: After 24 hours (86400 seconds), the failure counter resets to zero
How to Apply This Configuration
- Open Command Prompt as Administrator
- Right-click on Command Prompt and select “Run as administrator”
- Execute the command
- Replace
"LinxServer6"with your actual Linx service name if different - Run the command exactly as shown above
- Verify the configuration
- You can check the service properties in Services.msc under the “Recovery” tab
Why This Works
This configuration provides a progressive backoff strategy:
- Quick recovery for temporary issues (30 seconds)
- Moderate delay for persistent problems (2 minutes)
- Longer intervals to prevent resource exhaustion (10 minutes)
- Daily reset prevents permanent degraded state
Prerequisites
- Administrative privileges on the Windows machine
- The service name must match exactly (case-sensitive)
- Windows Service Control Manager must be available
Summary:
Use the sc.exe failure command to configure intelligent automatic restart behavior for your Linx server services. This ensures quick recovery from temporary failures while preventing system overload from persistent issues.