Max Retries

When a job run fails, the worker retries based on retry_policy_json and job defaults. This page reflects the behavior implemented in the queue consumer.

Current runtime fields

The worker currently reads retry configuration from retry_policy_json with these fields: max_retries and backoff_ms. If missing, it falls back to job max_retries (if present) and then to a default of 1 retry with a base backoff of 60000ms.

Backoff strategies

  • The current worker uses exponential-style growth from a base delay (backoff_ms).
  • With base 15000ms, attempts are delayed approximately 15s, 30s, 60s, 120s.
  • backoff_ms should be high enough to avoid retry storms against a degraded target service.

Configuring retries

Include retry_policy_json when creating or updating a job. The currently supported fields are max_retries (integer) and backoff_ms (milliseconds).
json
{
  "name": "Webhook with retries",
  "target_url": "https://example.com/hook",
  "schedule_cron": "0 * * * *",
  "retry_policy_json": {
    "max_retries": 5,
    "backoff_ms": 60000
  }
}
The job row stores this policy in retry_policy_json. Public create/update responses do not currently return an explicit effective_retries field, so inspect the stored job and run outcomes to verify behavior.

Example: API request and response

bash
curl -X POST https://api.velora.dev/api/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @job.json
json
{
  "id": "job_abc123",
  "owner_id": "user_123",
  "api_key_id": "key_456",
  "status": "active",
  "msg": "Job created"
}

What counts as a successful run

The worker treats any HTTP 2xx response as success and stops retrying. Non-2xx responses and network/timeout failures are treated as failed attempts and can trigger retries.

Best practices

  • Make your webhook endpoints idempotent so retries don't cause duplicated side effects.
  • Prefer exponential backoff to reduce retry storms against an overloaded service.
  • Use a bounded max_retries based on endpoint criticality and expected recovery time.
  • Monitor job_runs to identify noisy jobs and tune max_retries/backoff_ms per job.

Plan limits

Retry behavior can be affected by plan-level policy in product design, but hard caps are not currently surfaced by public job create responses. Treat plan caps as deployment-specific configuration.

Troubleshooting

  • If retries are not occurring, verify the job's stored retry_policy_json values.
  • Check job_runs for failure details and timestamps — verify the worker logged retry attempts.
  • If your endpoint is returning non-2xx responses, inspect response payloads and timeout behavior.
`retry_on` and per-status retry filtering are not currently part of the documented public runtime contract in this worker implementation.

© 2026 Velora · API Documentation