Skip to content

docs(serverless): document timeout tuning#5018

Draft
NathanFlurry wants to merge 1 commit into
counter-latency/kitchen-sink-load-harnessfrom
counter-latency/serverless-docs
Draft

docs(serverless): document timeout tuning#5018
NathanFlurry wants to merge 1 commit into
counter-latency/kitchen-sink-load-harnessfrom
counter-latency/serverless-docs

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

Code Review: docs(serverless): document timeout tuning

Overview: Small docs-only PR that improves the serverless production checklist with clearer, more actionable guidance on concurrency caps, requestLifespan, and drainGracePeriod tuning. Also appends driver test re-run results to the agent notes file.


.agent/notes/driver-test-progress.md

No concerns — log entries follow the existing format and all 6 DB file groups are reported as passing.


website/src/content/docs/general/production-checklist.mdx

Positive changes:

  • The rewritten concurrency bullet is a clear improvement. It explains why per-instance concurrency matters (one actor per in-flight /api/rivet/start) and names concrete platform knobs (--concurrency, reserved concurrency, maxDuration).
  • Adding separate bullets for requestLifespan and drainGracePeriod surfaces tuning that was previously invisible to operators — good addition.

Issues to verify:

  1. Vercel tier values look swapped. The bullet reads 295 for Vercel Hobby, 3595 for Vercel Pro. Vercel Hobby serverless functions have a 60-second hard timeout, not ~300 s. 295 s is 5 s below Vercel Pro's 300 s limit. Consider double-checking and using something like:

    • Hobby: 55 (below the 60 s cap)
    • Pro: 295 (below the 300 s cap)
    • Enterprise/streaming: 3595 (if applicable)
      Using the wrong value could cause operators on Hobby to set a requestLifespan that exceeds their actual platform limit, resulting in forcibly killed requests.
  2. AWS Lambda reserved concurrency framing. The bullet groups "AWS Lambda reserved concurrency" under the per-instance concurrency examples. Lambda reserved concurrency is a total concurrent-execution cap across all instances, not a per-instance setting. The most relevant Lambda knob is that Lambda is inherently single-threaded (one event at a time per instance), so per-instance concurrency is always 1. This could mislead Lambda users. Consider either dropping the Lambda example or clarifying that Lambda concurrency is always 1 per instance by default.

  3. drainGracePeriod default. The bullet says "Default is 30 minutes from the engine". If this differs from the value surfaced by configurePool or the value a user would see in generated docs, it may cause confusion. Worth confirming the canonical default before merge.

  4. Link validity. The requestLifespan bullet links to /docs/general/runtime-modes#timeouts and the drainGracePeriod bullet links to /docs/actors/limits. If those anchors or pages do not exist yet, the links will 404. Worth verifying both resolve correctly.


Summary: The intent and structure of these docs improvements are solid. The main thing to address before merge is the Vercel Hobby timeout value — using an incorrect example there is the most likely source of real operator pain.

@MasterPtato MasterPtato force-pushed the counter-latency/serverless-docs branch from cb4ffa1 to e646699 Compare May 14, 2026 17:26
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.

1 participant