putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
64 stars 24 forks source link

Queued items don't seem to adopt app.php "ttr" Time to Reserve setting #438

Closed adrianjean closed 10 months ago

adrianjean commented 10 months ago

I was sending campaigns and the queued batches were failing:

The process "'/usr/bin/php8.2' '/srv/www/website.com/craft' 'queue/exec' '205108' '300' '1' '1438' '--verbose=1' '--color='" exceeded the timeout of 300 seconds.

So in my /config.php I have the following setting to increase TTR / Time to Reserve:

'components' => [
        'queue' => [
            'ttr' => 3600, // increase the Time to Reserve to let all jobs run for an hour if need be Avoids 300ms timeout
        ],
    ],

I see that other queued items see this setting, but campaign sendouts always seem to be set to 300. Not sure if this is a Campaigns issue, or a CraftCMS issue tho.

bencroker commented 10 months ago

That is managed via the sendoutJobTtr config setting. https://github.com/putyourlightson/craft-campaign/blob/99030099bf64eb73e49c9160d92b9c2620e7c539/src/config.php#L105