Service Runtime Modes

Understand AutoDoctor API service runtime modes (bundled vs system Python), selection criteria, validation checks, and operational tradeoffs.

Who This Is For

  • Technical users deploying at scale.
  • Developers troubleshooting service startup behavior.

Modes Overview

  • Uses packaged autodoctor_service and packaged API executable.
  • Lower host dependency risk.
  • Best for standard endpoint deployments.

2) System Python (Advanced)

  • Registers and starts service via autodoctor_service.py using 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=bundled
  • Service.mode=system_python

Service wrapper reads this and changes child launch preference.

How Child API Startup Differs by Mode

  • bundled: prefer autodoctor_api.exe
  • system_python: prefer run_autodoctor.py with 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"

Next Steps