The default timeout of 300 is not enough to complete resaving all entries, which is necessary for the Craft 3.4.x upgrade.

I can't seem to find where this is set.
The 3.4 changelog suggests running ./craft resave/entries --update-search-index to improve your entries’ search indexes. But that doesn’t run over the queue.
But you can increase the default TTR for queue jobs, by adding this to config/app.php:
return [
'components' => [
'queue' => [
'ttr' => 600,
],
],
];
Most helpful comment
The 3.4 changelog suggests running
./craft resave/entries --update-search-indexto improve your entries’ search indexes. But that doesn’t run over the queue.But you can increase the default TTR for queue jobs, by adding this to
config/app.php: