Monitor and Recover PBRS API Executions
Correlate API requests with scheduler work, verify delivery and recover safely from stalled or long-running executions.
Review status: Draft for Development and Support review. Routes and models labelled validation required must be tested against the supported PBRS build before publication.
Record a correlation envelope
- Client request timestamp and timezone
- PBRS build and server
- Sanitized route and operation
- Schedule identifier and schedule type
- Execution identifier and RunBy value
- Terminal state and sanitized ResultJson
- Expected artifact and destination result
Monitoring sequence
- Confirm the API accepted the request.
- Correlate the execution identifier with PBRS queue or history data.
- Poll at a bounded cadence until a terminal state or client timeout.
- Parse ResultJson and identify source, rendering and destination outcomes.
- Verify each expected artifact and delivery independently.
- Reconcile ambiguous or timed-out requests before any retry.
Recovery sequence
- Attempt the documented cancellation operation when supported.
- Inspect the current execution queue and available scheduler threads.
- Use the build-supported UI termination action for a long-running job.
- Escalate to service or process intervention only under the approved runbook.
- After recovery, confirm service health and reconcile affected schedules and deliveries.
Queue termination and any legacy process-level fallback are build-sensitive. Document the introducing build and operator permissions before publication.
Synthetic monitoring schedule
Use a harmless, allow-listed schedule with a controlled destination as an end-to-end probe. Run it at an interval appropriate to the environment and alert separately when:
- the API service cannot be reached;
- ping succeeds but authentication or a protected read fails;
- the scheduler is stopped;
- queue depth or oldest execution age exceeds the tested baseline;
- the execution reaches no terminal state within the client timeout;
- the API reports completion but the expected artifact or destination acknowledgement is missing.
Long-running job recovery
- Identify the execution using
ExecutionId, schedule, server, time and process ID. - Attempt the documented API cancellation if the build supports it.
- Use the current API Execution Queue termination action when available and authorized.
- Use process-level termination only as an approved legacy fallback; record the process ID and affected execution first.
- Before restarting services, identify unsafe automation jobs that must not rerun automatically.
- After recovery, verify API/scheduler health, reconcile outputs and decide deliberately which work to rerun.
Documentation standard: Record the PBRS build used for verification, test in a non-production environment, redact credentials and customer data, and confirm the saved PBRS state after every write.