DeployKit

Limits

How big a deploy can be, and how to control memory and disk use.

Size limits

LimitValue
Files per deploy20,000
Largest file100,000,000 bytes (maxFileBytes)
Manifest JSON16 MiB
Host response2 MiB

Hosts add their own: see Cloudflare's limits. Your account plan may have more. Going over a limit fails with TransferLimitError before anything is uploaded.

Timeouts

OperationDefault
Each HTTP operation, with retries30 s (timeoutMs on the client)
Reading a file from its source30 s
waitUntilServing60 s total, 30 s per request
Platform waitUntilReady5 minutes

There's no overall deadline on a deploy. Add one with an AbortSignal or Effect.timeout.

Memory and disk

Files up to 8 MiB are uploaded from memory. Bigger ones are copied to a temporary file, checked, and uploaded from there, so a retry doesn't need to re-read the source. Temporary files are deleted when the deploy ends, however it ends. If the process is killed, some may be left behind.

You need a writable temp directory with room for the large files in flight.

Two budgets cap how much deploykit uses at once, across every deploy through one client or layer:

SettingDefaultCaps
memoryBudgetBytes256 MiBMemory reserved for files being uploaded
stagingBudgetBytes256 MiBDisk used by temporary files
maxFileBytes100 MBLargest single file

A deploy that needs more waits for others to release their share, rather than failing.

src/deploykit.ts
import * as Vercel from "@deploykit/vercel"

// With credentials from the environment:
export const DeploykitLive = Vercel.layerConfig({
  memoryBudgetBytes: 512 * 1024 * 1024,
  stagingBudgetBytes: 1024 * 1024 * 1024
})

// Or with explicit options:
Vercel.layer({ token, memoryBudgetBytes: 512 * 1024 * 1024 })

A file held in memory reserves about 16 times its size plus 8 MiB while it's hashed and uploaded, so a 256 MiB budget handles a handful of large in-memory files at once. Staged files reserve 1 MiB.

These only cover deploykit's own buffers, not your whole process. Your file sources, the runtime and garbage collection use memory on top.

Last updated on

On this page