{
  "id": "php/laravel-queue-worker-timeout-exceeded",
  "signature": "Symfony\\Component\\Process\\Exception\\ProcessTimedOutException: The process \"'php' 'artisan' 'queue:work' '--queue=high,default' '--timeout=60'\" exceeded the timeout of 60 seconds.",
  "signature_zh": "Symfony\\Component\\Process\\Exception\\ProcessTimedOutException：进程 \"'php' 'artisan' 'queue:work' '--queue=high,default' '--timeout=60'\" 超过了 60 秒的超时时间。",
  "regex": "/ProcessTimedOutException: The process \"'php' 'artisan' 'queue:work'.*exceeded the timeout of \\d+ seconds/",
  "domain": "php",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The Laravel queue worker process is being killed by the timeout setting because a job is taking longer than the configured timeout to execute, often due to slow external API calls, database queries, or infinite loops.",
  "root_cause_type": "generic",
  "root_cause_zh": "Laravel 队列工作进程因超时设置而被杀死，因为某个作业的执行时间超过了配置的超时时间，通常是由于外部 API 调用缓慢、数据库查询慢或无限循环。",
  "versions": [
    {
      "version": "Laravel 9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Laravel 10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Laravel 11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Setting the timeout to a very high value like 3600 seconds without investigating the root cause",
      "why_fails": "This only masks the problem; if a job hangs indefinitely, it will still eventually timeout or consume excessive resources, and the queue will stall.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Restarting the queue worker with `php artisan queue:restart`",
      "why_fails": "Restarting does not fix the underlying slow job; the job will be retried and fail again with the same timeout.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the timeout for the specific queue worker: `php artisan queue:work --timeout=120` (set to 120 seconds). Also update the `--timeout` option in your supervisor configuration if using it.",
      "success_rate": 0.75,
      "how": "Increase the timeout for the specific queue worker: `php artisan queue:work --timeout=120` (set to 120 seconds). Also update the `--timeout` option in your supervisor configuration if using it.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Identify and optimize the slow job. Add logging to track execution time: `$start = microtime(true); // ... job logic ... \\Log::info('Job took: ' . (microtime(true) - $start) . ' seconds');` Then refactor the job to use chunked processing, caching, or queueable API calls.",
      "success_rate": 0.85,
      "how": "Identify and optimize the slow job. Add logging to track execution time: `$start = microtime(true); // ... job logic ... \\Log::info('Job took: ' . (microtime(true) - $start) . ' seconds');` Then refactor the job to use chunked processing, caching, or queueable API calls.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the timeout for the specific queue worker: `php artisan queue:work --timeout=120` (set to 120 seconds). Also update the `--timeout` option in your supervisor configuration if using it.",
    "Identify and optimize the slow job. Add logging to track execution time: `$start = microtime(true); // ... job logic ... \\Log::info('Job took: ' . (microtime(true) - $start) . ' seconds');` Then refactor the job to use chunked processing, caching, or queueable API calls."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://laravel.com/docs/10.x/queues#timeout",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-02-18",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}