Tencent/WeKnora · error
execution timed out
Error message
execution timed out
What it means
Sentinel ErrTimeout in internal/sandbox returned when a sandboxed script execution exceeds its allotted time — either the per-call execution timeout or the HTTP timeout to the sandbox provider. It signals the run was aborted, with no complete result available.
Source
Thrown at internal/sandbox/sandbox.go:101
// DefaultCubeSandboxTTL is the Cube-side sandbox lifetime hint (in seconds)
// requested at creation; the sandbox is torn down by CubeMaster if the
// client goes silent for longer than this value.
DefaultCubeSandboxTTL = 30 * time.Minute
// DefaultCubeHTTPTimeout bounds a single HTTP call to the CubeAPI
// (excluding user script execution which has its own per-call timeout).
DefaultCubeHTTPTimeout = 30 * time.Second
// DefaultE2BSandboxTTL matches the E2B SDK's built-in default so an
// unset E2BSandboxTTL still yields a valid sandbox lifetime.
DefaultE2BSandboxTTL = 5 * time.Minute
// DefaultE2BHTTPTimeout bounds a single HTTP call to the E2B API.
DefaultE2BHTTPTimeout = 30 * time.Second
)
// Common errors
var (
ErrSandboxDisabled = errors.New("sandbox is disabled")
ErrTimeout = errors.New("execution timed out")
ErrScriptNotFound = errors.New("script not found")
ErrInvalidScript = errors.New("invalid script")
ErrExecutionFailed = errors.New("script execution failed")
ErrSecurityViolation = errors.New("security validation failed")
ErrDangerousCommand = errors.New("script contains dangerous command")
ErrArgInjection = errors.New("argument injection detected")
ErrStdinInjection = errors.New("stdin injection detected")
)
// Sandbox defines the interface for isolated script execution
type Sandbox interface {
// Execute runs a script in an isolated environment
Execute(ctx context.Context, config *ExecuteConfig) (*ExecuteResult, error)
// Cleanup releases sandbox resources
Cleanup(ctx context.Context) error
// Type returns the sandbox typeView on GitHub (pinned to 988cbb0330)
Solutions
- Increase the per-execution timeout or provider HTTP timeout configuration
- Optimize/limit the user script (loops, large data) that caused the overrun
- Retry once if the provider was transiently slow; otherwise surface a timeout to the user
- Check sandbox provider health/latency
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/sandbox/sandbox.go:101 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/2cc0c47094a0080e.
Report an issue: GitHub.