# Is buildkite-agent intended to be used on preemptible instances?

**URL:** <https://forum.buildkite.community/t/is-buildkite-agent-intended-to-be-used-on-preemptible-instances/1297>\
**Category:** General\
**Created:** [October 22, 2020, 10:42pm UTC](https://forum.buildkite.community/t/is-buildkite-agent-intended-to-be-used-on-preemptible-instances/1297 "2020-10-22T22:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![harisekhon](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@harisekhon](https://forum.buildkite.community/u/harisekhon)\
**Post date:** [December 15, 2020, 6:31pm UTC](https://forum.buildkite.community/t/is-buildkite-agent-intended-to-be-used-on-preemptible-instances/1297/6 "2020-12-15T18:31:43Z")

</div>

Buildkite is not well suited to preemptible instances because even with a spot termination script to shut down the agent, you usually only have 30 seconds to do that and since most builds take longer than 30 seconds you won’t be able to wait and will incur false negative build failures.

See this ticket I’ve just raised which would make BuildKite more suitable for use with pre-emptible instances:

> [@Reschedule builds on other agents rather than Fail builds when agents time out or are killed (machine shut down or put to sleep)](https://forum.buildkite.community/t/reschedule-builds-on-other-agents-rather-than-fail-builds-when-agents-time-out-or-are-killed-machine-shut-down-or-put-to-sleep/1388):
>
> Please can you implement build retries on other agents to handle when the BuildKite agent goes away due to the agent or machine being shut down or machine put to sleep. In distributed processing systems it is common to retry a task 4 times on 4 different hosts before declaring a task as actually failed, because a lot of the time those failures are due to temporary issues or machines dying or in my case being shut down or put to sleep because I run BuildKite agents on my laptop. This will also …

---

_[View the full topic](https://forum.buildkite.community/t/is-buildkite-agent-intended-to-be-used-on-preemptible-instances/1297)._
