Correct settings for autothrottling emails?

I have about 500 subscribers. I want to send the emails out over an hour.

These are the relevant settings in my config.php:

define('MAILQUEUE_BATCH_SIZE', 500);
define('MAILQUEUE_BATCH_PERIOD', 3600);
define('MAILQUEUE_THROTTLE', 0);
define('MAILQUEUE_AUTOTHROTTLE', 1);
define('MAX_PROCESSQUEUE_TIME', 0);

But the logging email shows that only about half are being sent:

[Sun 10 Nov 2024 12:45] [CL] Sending in batches of 500 emails
[Sun 10 Nov 2024 12:45] [CL] Processing has started,
[Sun 10 Nov 2024 12:45] [CL] One campaign to process.
[Sun 10 Nov 2024 12:45] [CL] Processing campaign 18
[Sun 10 Nov 2024 12:45] [CL] Looking for subscribers
[Sun 10 Nov 2024 12:45] [CL] Found them: 469 to process
[Sun 10 Nov 2024 13:14] [CL] Processed 469 out of 469 subscribers
[Sun 10 Nov 2024 13:14] [CL] Script stage: 5
[Sun 10 Nov 2024 13:14] [CL] 246 messages sent in 1771.21 seconds (499 msgs/hr)
[Sun 10 Nov 2024 13:14] [CL] 223 failed (will retry later)

It doesn’t say why those 223 failed. 30 minutes after sending stops, it restarts but doesn’t get very far:

[Sun 10 Nov 2024 13:45] [CL] Sending in batches of 500 messages
[Sun 10 Nov 2024 13:45] [CL] This batch will be 254 emails, because in the last 3,600 seconds 246 emails were sent
[Sun 10 Nov 2024 13:45] [CL] Processing has started,
[Sun 10 Nov 2024 13:45] [CL] One campaign to process.
[Sun 10 Nov 2024 13:45] [CL] Processing campaign 18
[Sun 10 Nov 2024 13:45] [CL] Looking for subscribers
[Sun 10 Nov 2024 13:45] [CL] Found them: 223 to process
[Sun 10 Nov 2024 13:45] [CL] Processed 223 out of 223 subscribers
[Sun 10 Nov 2024 13:45] [CL] Script stage: 5
[Sun 10 Nov 2024 13:45] [CL] 7 messages sent in 50.97 seconds (494 msgs/hr)
[Sun 10 Nov 2024 13:45] [CL] 216 failed (will retry later)

If I go to process the queue manually, it seems to send one at a time.

Would I be better turning off batch size and setting a delay of, say, 6 seconds between emails?

Well, that didn’t work. Tried setting a 1 second delay in config.php:

define('MAILQUEUE_BATCH_SIZE', 0);
define('MAILQUEUE_BATCH_PERIOD', 3600);
define('MAILQUEUE_THROTTLE', 1);
define('MAILQUEUE_AUTOTHROTTLE', 0);

The first campaign fails halfway through:

[Tue 12 Nov 2024 12:49] [CL] 209 messages sent in 248.96 seconds (3022 msgs/hr)
[Tue 12 Nov 2024 12:49] [CL] 256 failed (will retry later)

At the next scheduled send:

[Tue 12 Nov 2024 13:45] [CL] Processed 256 out of 256 subscribers
[Tue 12 Nov 2024 13:45] [CL] Script stage: 5
[Tue 12 Nov 2024 13:45] [CL] 13 messages sent in 16.97 seconds (2758 msgs/hr)
[Tue 12 Nov 2024 13:45] [CL] 243 failed (will retry later)

Is there any way to find why sending failed?

The Event Log page will show any errors while sending.

It doesn’t seem to show anything more than the admin email:

7968 2024-11-12 12:49:11 Finished this run
7967 2024-11-12 12:49:11 256 failed (will retry later)
7966 2024-11-12 12:49:11 209 messages sent in 248.96 seconds (3022 msgs/hr)
7965 2024-11-12 12:49:11 Processed 465 out of 465 subscribers

When I manually process the queue later, I see

7976 2024-11-12 13:45:20 243 failed (will retry later)
7975 2024-11-12 13:45:20 13 messages sent in 16.97 seconds (2758 msgs/hr)

And I end up with a hundred admin emails.

Is there a way to make it instantly retry when it fails? All the emails eventually get sent - but it is pain to have to do it manually each time.

@edent Have you enabled domain throttling or something similar? That may be the cause of so many failures to send.

The default my installation had was:

define('USE_DOMAIN_THROTTLE', 1);
define('DOMAIN_BATCH_SIZE', 1);
define('DOMAIN_BATCH_PERIOD', 120);

I’ve switched that off, and will see if that works.