HTTP Result Code: 500

Created on 27 August 2024, 4 months ago
Updated 4 September 2024, 4 months ago

Problem/Motivation

Sometimes - especially if translating many nodes - with over 20 languages, the following error is upcoming:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=2305&op=do_nojs&op=do
StatusText: error
ResponseText: The website encountered an unexpected error. Try again later.GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.deepl.com/v2/translate in GuzzleHttp\Handler\CurlFactory::createRejection() (line 210 of /var/www/drupal10/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).

The DeepL API documentation say about HTTP Status 500:
HTTP 500: internal server error
This is an error you'll receive if there are temporary errors in DeepL Services. Your application should be configured to resend the requests after some delay. Specifically, we recommend implementing retries with exponential backoff. This is implemented in all of the official, DeepL-supported client libraries.

Is it possible to increase the retries?

Or how to confront to this error?

💬 Support request
Status

Active

Version

2.2

Component

Code

Created by

🇩🇪Germany WalterP

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

Comments & Activities

  • Issue created by @WalterP
  • 🇩🇪Germany SteffenR Germany

    Looks like the request payload is to big and causes the timeout or your connection is too slow.
    Can you give more details on the amount of text you try to translate and give steps to reproduce the issue?

  • 🇩🇪Germany WalterP

    In the moment, I didn't find concrete steps to reproduce the failure. We are always translate into over 20 languages.

    Sometimes the error appear on translating one node with small text and on the other side sometimes no error appear on translating many (10) nodes with much text.
    But in any way, if the translation abort, you have to delete or submit many jobs manually.

    The connection should be fast enough - the drupal server is hosted with Gigabit connections and the client, who starts the tmgmt job, has a 200 Mbit connection.

    At this point, I thought - as the hint of DeepL says - to implement the retries would be an approach.

  • 🇩🇪Germany SteffenR Germany

    The official DeepL-PHP library is being integrated in https://git.drupalcode.org/issue/tmgmt_deepl-3324073/-/tree/3324073-use-...

    Can you give it a try please and give feedback?

Production build 0.71.5 2024