Skip to content

Conversation

@Niebvelungen
Copy link

@Niebvelungen Niebvelungen commented Apr 16, 2025

Fixed a problem with mailers that have a concurrent connection limit by making the bulk resend operation resend the next mail after the last one has succeeded.

Currently there is an issue in the Bulk resend operation where it will fail by sending too many requests at once.
The mailer will return a 400 Bad Request because the connection limit is overstepped.

Solution: Make the resend mails wait for the previous to finish being sent.

Possible problems: Performance will suffer a bit since it waits for each call to finish.

…by making the bulk operation send mails after the first one has succeeded.
@Niebvelungen Niebvelungen changed the title Fixed a problem with mailers that have a concurrent connection limit fix: Fixed a problem with mailers that have a concurrent connection limit on bulk resend Apr 16, 2025
@tinect
Copy link
Member

tinect commented Apr 16, 2025

I like the goal.

Related to the possible problem:
I don't see it as a problem. When you need to resend many mails over and over, there might be other problems in the shops environment.

@shyim
Copy link
Member

shyim commented Apr 16, 2025

maybe configure to send the mails over queue and there you can rate limit 🤔

@Niebvelungen
Copy link
Author

Niebvelungen commented Apr 16, 2025

maybe configure to send the mails over queue and there you can rate limit 🤔

Yes this would work aswell, but as it currently stands, when you select 100 mails to resend it shoots out 100 separate API requests instantaneously without delay, which could overwelm the server and pose other problems aswell.

If this is wanted behaviour of the Plugin then thats ok.

This change would just minimize the risk of having to configure something different when using the mailer plugin in the first place, with the only drawback being a bit of a FE speed loss in the Administration when resending larger amounts of mails.
(Since the loading state is keept while the resend function itterates what to send and waits for them to finish before sending the next one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants