Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion serverless/development/optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Use [benchmarking](/serverless/development/benchmarking) to measure these metric
</Tip>

<Note>
If cold start exceeds 7 minutes, the worker is marked unhealthy. Extend with `RUNPOD_INIT_TIMEOUT=800` (seconds).
If cold start exceeds 7 minutes, the worker is marked unhealthy. Increase Initialization timeout in the endpoint configuration to allow more time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"If cold start exceeds 7 minutes" is the default, which the new text makes configurable, so it reads as a fixed limit. Something like "exceeds the Initialization timeout (7 minutes by default)" with a link to the endpoint configuration section would stay correct. "Marked unhealthy" is also softer than what happens, which is that the worker is stopped.

</Note>

## Reduce cold starts
Expand Down
6 changes: 5 additions & 1 deletion serverless/endpoints/endpoint-configurations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ Once an endpoint has been scaled down this way, it stays at its reduced max work

### Initialization timeout

`RUNPOD_INIT_TIMEOUT` in the endpoint configuration sets how long, in seconds, a worker can take to initialize before Runpod stops it. The default is 420 seconds. Workers are billed while they initialize. For large models that need longer to load, set a higher value.
Initialization timeout in the endpoint configuration sets how long, in seconds, a worker can take to initialize before Runpod stops it. The default is 420 seconds. Range: 60 to 14400 seconds. Workers are billed while they initialize. For large models that need longer to load, set a higher value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PR description says RUNPOD_INIT_TIMEOUT still works when the field is not set, but this page drops it entirely, and six migrate pages (baseten, fal, hugging-face, modal, replicate, together-ai) still tell readers to set it as an env var. Two things I would want settled: one sentence here saying which wins when both are set, and whether those pages should now point at the endpoint setting. As written a reader can set both and not know which applies.


The timeout starts when the worker starts, after its image and models are downloaded, and ends when the worker first reports that it is ready. A worker that runs past the timeout is stopped within about 90 seconds.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"The timeout starts when the worker starts, after its image and models are downloaded" does not match how I read the worker lifecycle. The init deadline is set when the worker is resumed on the host (now plus the configured seconds), before the image pull and model download, so a slow pull spends the same budget. Can you confirm with whoever owns the platform side? If I am right, this sentence misleads exactly the readers the section is for: someone with a large model who raises the value expecting the download not to count. It would also contradict the migrate/baseten.mdx troubleshooting line, which says a cached model keeps the download from counting against startup.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where does "within about 90 seconds" come from? As far as I can tell a worker is only stopped after the platform sees it as not reporting on two separate sweeps, so the delay depends on the sweep interval rather than a fixed number. If there is no measured source, "shortly after" is safer than a figure readers will plan around.


With the REST API, set `workers.initTimeout` in seconds when you [create](/api-reference-v2/serverless/create-a-serverless-endpoint) or [update](/api-reference-v2/serverless/update-a-serverless-endpoint) an endpoint.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two behaviours worth a line here if they are known: what happens when workers.initTimeout is sent as null on update (does it fall back to the env var or the 420 default), and whether a changed value applies to workers already running or only to ones started after the update. I could not tell from the page, and both change what a reader should expect after editing.


### Execution timeout

Expand Down
Loading