429 "Too many request" when translating nodes with many paragraphs and DeepL

Created on 27 June 2025, about 1 month ago

Problem/Motivation

Articles with many (nested) paragraphs call the DeepL API (and all others as well - should probably be fixed in other vendors' API calls as well!) repeatedly, leading to an HTTP 429 "Too many requests".

Steps to reproduce

Create node with lots of (nested) paragraphs (9 with 12 items each in my case).
Use DeepL free API.
Trigger translation.
Get error.

Proposed resolution

I see two options, the first of them will be sent as a MR shortly.
1. Implement an exponential backoff just like the docs say (https://developers.deepl.com/docs/best-practices/error-handling). I used a similar strategy as the official PHP library at https://github.com/DeepLcom/deepl-php/blob/main/src/BackoffTimer.php
2. Use deepl-php and do not implement this again. Might be more future-proof but above my skills. Would most likely also handle other error scenarios better and would probably provide for a more stable API.

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇦🇹Austria tgoeg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024