NewSumm reads news from hundreds of outlets and groups articles about the same event into one story. All of that happens in queued jobs: fetching feeds, grouping articles, writing summaries. Some of those jobs take several minutes.
For a while, our failed jobs table kept filling up. 726 failures , nearly all of them TimeoutExceededException , spread across fetching, grouping and summarising. Nothing was obviously broken. The jobs worked when we ran them by hand. They just kept failing in production, and the summaries kept costing more than they should.
The cause was two numbers in two different files.
Two timers that sound like the same thing
Laravel queues have two settings that are easy to mix up.
The job timeout is how long a single job is allowed to run before the worker stops it.…