Automation · Error Handling
Timeout
Cheat sheet · https://pcornel.dk/topic.php?topic=5978
Answer
Timeouts in error handling stop operations that hang, such as a stuck API call or SSH session, and turn them into clear failures that can be retried or reported.
Remember
- Set timeouts on network calls and waits.
- Base them on measured durations.
- Fail clearly when they expire.
First checks
timeout 60 <cmd>— command timeout- Client timeouts (connect/read) — network calls
- Overall job timeout — runaway protection
Verify in this order
operation → timeout → abort/cleanup
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5978