Service Runtime Modes
Understand AutoDoctor API service runtime modes (bundled vs system Python), selection criteria, validation checks, and operational tradeoffs.
Categories:
Who This Is For
- Technical users deploying at scale.
- Developers troubleshooting service startup behavior.
Modes Overview
1) Bundled Runtime (Recommended)
- Uses packaged
autodoctor_serviceand packaged API executable. - Lower host dependency risk.
- Best for standard endpoint deployments.
2) System Python (Advanced)
- Registers and starts service via
autodoctor_service.pyusing host Python. - Requires packages in host interpreter:
python -m pip install pywin32 fastapi uvicorn
- Useful where policy requires managed host Python.
Installer Integration
Installer offers an API service installation mode choice and writes mode to INI:
Service.mode=bundledService.mode=system_python
Service wrapper reads this and changes child launch preference.
How Child API Startup Differs by Mode
bundled: preferautodoctor_api.exesystem_python: preferrun_autodoctor.pywith Python interpreter
This is designed to keep runtime behavior aligned with selected install mode.
Troubleshooting Mode-Specific Failures
Bundled mode starts service but dashboard/API unreachable
- Validate child process and API health:
Get-Service AutoDoctorAPI
Invoke-RestMethod http://127.0.0.1:8000/health
System Python mode fails validation in installer
- Ensure Python exists and imports required packages:
py -3 --version
python -c "import win32serviceutil,servicemanager,fastapi,uvicorn; print('ok')"
Force interpreter path for installer
$env:AUTO_DOCTOR_SYSTEM_PYTHON = "C:\Python312\python.exe"