# Symfony\Component\Process\Exception\ProcessTimedOutException：进程 "'php' 'artisan' 'queue:work' '--queue=high,default' '--timeout=60'" 超过了 60 秒的超时时间。

- **ID:** `php/laravel-queue-worker-timeout-exceeded`
- **领域:** php
- **类别:** system_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

Laravel 队列工作进程因超时设置而被杀死，因为某个作业的执行时间超过了配置的超时时间，通常是由于外部 API 调用缓慢、数据库查询慢或无限循环。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Laravel 9 | active | — | — |
| Laravel 10 | active | — | — |
| Laravel 11 | active | — | — |

## 解决方案

1. ```
   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.
   ```
2. ```
   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.
   ```

## 无效尝试

- **Setting the timeout to a very high value like 3600 seconds without investigating the root cause** — This only masks the problem; if a job hangs indefinitely, it will still eventually timeout or consume excessive resources, and the queue will stall. (80% 失败率)
- **Restarting the queue worker with `php artisan queue:restart`** — Restarting does not fix the underlying slow job; the job will be retried and fail again with the same timeout. (95% 失败率)
