Skip to content

Increase actor termination grace period to 30m - #1565

Merged
Julian Gutierrez Oschmann (juli4n) merged 2 commits into
agent-substrate:mainfrom
sfunkenhauser:actor_tgp
Sep 9, 2026
Merged

Julian Gutierrez Oschmann (juli4n) merged 2 commits into
agent-substrate:mainfrom
sfunkenhauser:actor_tgp

Conversation

@sfunkenhauser

@sfunkenhauser Scott Funkenhauser (sfunkenhauser) commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

A one-minute grace period is nowhere near enough for an actor to suspend normally, so evictions were very likely to leave actors CRASHED instead of cleanly suspended.

Previously there were two 1 minute timeouts. Waiting for in-flight RPCs to finish, and then another for SIGTERM. With such a short termination grace period the in-flight RPC could have eaten a significant portion of the timeout leaving very little for the actor.

With a longer timeout this is less of a concern, and has now been collapsed into a single deadline for both operations.

Fixes #1560

  • [ x ] Tests pass
  • [ x ] Appropriate changes to documentation are included in the PR

A one-minute grace period is nowhere near enough for an actor to suspend
normally, so evictions were very likely to leave actors CRASHED instead of
cleanly suspended.
Comment thread cmd/ateom-gvisor/main.go Outdated
// It needs to stay significantly less than the K8s termination grace period
// for the ateom, so the escalation to SIGKILL happens here rather than as a
// kubelet SIGKILL of ateom itself. A var so tests can shorten it.
var workloadGracePeriod = 30 * time.Minute

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why switching to a var?

A var so tests can shorten it.

I don't see it being set in tests.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, these were left over from a previous iteration and are no longer needed. The workload / containerKillTimeout are still var so they can be overridden in the tests and save ~10s.

@juli4n
Julian Gutierrez Oschmann (juli4n) merged commit 6730460 into agent-substrate:main Sep 9, 2026
9 checks passed
Julian Gutierrez Oschmann (juli4n) pushed a commit that referenced this pull request Sep 9, 2026
Cherry-picking #1565

- [ x ] Tests pass
- [ x ] Appropriate changes to documentation are included in the PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider a longer workerGracePeriod

2 participants