Skip to content

Support per-operation API request timeouts through Forge metadata #26

Open

Description

@irvinebroque

Problem

cf workers versions profile supports CPU and heap captures lasting up to 50 seconds, but cf currently applies a 30-second default API request deadline. A valid capture can therefore be aborted before the profiling operation finishes.

cf workers versions profile latest \
  --worker-id "$WORKER_ID_OR_NAME" \
  --duration-ms 50000 \
  --profile-type cpu > worker-cpu.pprof.gz

See the profiling API documentation and announcement.

Workaround in cloudflare/cf#257

cloudflare/cf#257 raises the shared default API timeout from 30 to 60 seconds. This gives a maximum-length profiling capture 10 seconds of additional request budget and applies consistently to SDK and raw-response requests.

This is a general default increase rather than an endpoint-specific timeout policy. It addresses the immediate mismatch, but other operations may need different timeouts.

What we need from Forge

Something like:

x-forge-request-timeout-ms: 60000

Let each endpoint declare its own timeout. refs OAI/OpenAPI-Specification#695

Activity

  1. transferred this issue fromcloudflare/cfon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions