I have some selenium UI tests which are running through Browserstack. However randomly I get in a middle of the test Exited with status -1 (agent lost) error and the step fails.
I don’t have any timeouts in terms of steps so any hints on what will be the cases where this error is triggered.
Thanks for reaching out to us. Agent lost is a case where the agent running/scehduled to run the job is no longer available/terminated, causing the job to be terminated with a “-1” exit code. This is ideally independent from any timeouts. After registering with the Buildkite API, an agent regularly sends heartbeat updates to indicate that it is operational. If the Buildkite API does not receive any heartbeat requests from an agent for 3 consecutive minutes, that agent is marked as lost within the next 60 seconds, which results in exit code “-1”. You can find more information about it in the troubleshooting section here.
Is there a possibility to tweak the heartbeat requests value? As in maybe I want to mark the agent as lost if I don’t receive heartbeat for 30 minutes. Of course at queue level to not impact other queues.