DeepLX icon indicating copy to clipboard operation
DeepLX copied to clipboard

Is the API down?

Open itkc7 opened this issue 8 months ago • 32 comments
trafficstars

Recently I have been able to use this wonderful platform without any issues. Today I keep encountering "{"code":503,"message":"Translation failed"}%"

itkc7 avatar Feb 26 '25 19:02 itkc7

It seems that I have encountered the same problem, checking.

missuo avatar Feb 26 '25 19:02 missuo

The same issue here.

iG8R avatar Feb 27 '25 00:02 iG8R

+1,can be solved?

lyskywalker avatar Feb 27 '25 02:02 lyskywalker

waiting for update...

jiaxp3144 avatar Feb 27 '25 03:02 jiaxp3144

Same issue.

jv43 avatar Mar 01 '25 05:03 jv43

Same, how to turn on debug logging

ZHLONG-CN avatar Mar 01 '25 05:03 ZHLONG-CN

Fixed. https://github.com/OwO-Network/DeepLX/commit/2400139a8db6508f6d1b30a2de862b73413fbf91

missuo avatar Mar 01 '25 09:03 missuo

Unfortunately, it only worked for a couple of hours before the same 503 error popped up again.

Image

iG8R avatar Mar 01 '25 15:03 iG8R

Works for the first request only.

Image

The issue seems unresolved. Reopen the issue please.

osenvosem avatar Mar 02 '25 10:03 osenvosem

@iG8R @osenvosem It seems that we are unable to reproduce your issue. Can you provide detailed reproduction steps? And please confirm the version you are using.

missuo avatar Mar 02 '25 10:03 missuo

curl -X POST 'http://localhost:1188/v2/translate'
--header 'Authorization: DeepL-Auth-Key [yourAccessToken]'
--header 'Content-Type: application/json'
--data '{ "text": [ " Czekam już ponad miesiąc!" ], "target_lang": "ZH" }'

Developed by sjlleo [email protected] and missuo [email protected]. [GIN] 2025/03/02 - 10:37:57 | 503 | 1.239518217s | 10.1.12.3 | POST "/translate" [GIN] 2025/03/02 - 10:38:05 | 503 | 5.917046238s | 10.1.12.3 | POST "/translate" [GIN] 2025/03/02 - 10:40:12 | 503 | 3.293324473s | 10.1.20.4 | POST "/translate" [GIN] 2025/03/02 - 10:40:14 | 503 | 1.499507029s | 10.1.20.4 | POST "/translate" [GIN] 2025/03/02 - 10:40:16 | 503 | 2.540156816s | 10.1.20.4 | POST "/translate" [GIN] 2025/03/02 - 10:43:33 | 503 | 1.243982222s | 43.139.80.25 | POST "/translate" [GIN] 2025/03/02 - 10:43:46 | 503 | 1.213554277s | 43.139.80.25 | POST "/translate" [GIN] 2025/03/02 - 10:44:43 | 503 | 1.575093556s | 10.1.12.3 | POST "/translate" [GIN] 2025/03/02 - 10:45:39 | 503 | 1.225455014s | 172.17.0.1 | POST "/v2/translate" [GIN] 2025/03/02 - 10:45:43 | 503 | 1.497694117s | 172.17.0.1 | POST "/v2/translate" [GIN] 2025/03/02 - 10:45:43 | 503 | 1.312478605s | 10.1.20.4 | POST "/translate" [GIN] 2025/03/02 - 10:46:28 | 503 | 1.48713896s | 10.1.20.4 | POST "/translate"

frying52 avatar Mar 02 '25 10:03 frying52

[root@VM-12-3-opencloudos ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0eac8ff0c6db ghcr.io/owo-network/deeplx:latest "/app/deeplx" 10 minutes ago Up 10 minutes 0.0.0.0:1188->1188/tcp, :::1188->1188/tcp charming_noether

frying52 avatar Mar 02 '25 10:03 frying52

@iG8R @osenvosem It seems that we are unable to reproduce your issue. Can you provide detailed reproduction steps? And please confirm the version you are using.

使用沉浸式翻译,v1接口,会出现503。手动使用api调用测试,可以正常响应。是不是并发高会出现这个问题。

lamcodes avatar Mar 02 '25 12:03 lamcodes

I also have the same problem.

Image Sorry, I am not familiar with this program and do not know how to provide more information.

Horitide avatar Mar 02 '25 13:03 Horitide

It's working fine on my end, so I have no idea how to fix it. Also, I'm traveling and don't have time to fix this.

If someone can submit a PR, I will review and merge it ASAP.

missuo avatar Mar 02 '25 14:03 missuo

@missuo In the screencast, i used the following extension - https://github.com/immersive-translate/immersive-translate/

https://github.com/user-attachments/assets/00dd645a-d7b9-4188-bc92-38e5ce5ecf79

iG8R avatar Mar 02 '25 14:03 iG8R

@missuo In the screencast, i used the following extension - https://github.com/immersive-translate/immersive-translate/

https://github.com/user-attachments/assets/00dd645a-d7b9-4188-bc92-38e5ce5ecf79

Please read the DeepLX official documentation carefully. We do not recommend integration with Immersive Translate.

missuo avatar Mar 02 '25 14:03 missuo

@missuo

Please read the DeepLX official documentation carefully. We do not recommend integration with Immersive Translate.

But it worked perfectly fine until recently, and as you can see, it still works during manual service checks, even after numerous 503 errors.

iG8R avatar Mar 02 '25 14:03 iG8R

@missuo Is there any debug mode in DeepLX with advanced logging to be able to localize this issue?

iG8R avatar Mar 02 '25 15:03 iG8R

But it worked perfectly fine until recently, and as you can see, it still works during manual service checks, even after numerous 503 errors.

I've tested and find it works well with Kiss Translator, while with Immersive Translate here comes error 503, so the problem may be not related to DeepLX, but Immersive Translate.

zhangsherry avatar Mar 02 '25 16:03 zhangsherry

I've tested and find it works well with Kiss Translator, while with Immersive Translate here comes error 503, so the problem may be not related to DeepLX, but Immersive Translate.

Everything worked perfectly until four days ago, when a 503 error started popping up for other users as well, even those not using Immersive Translate.

iG8R avatar Mar 02 '25 16:03 iG8R

Hm... with pot-desktop https://github.com/pot-app/pot-desktop DeepLX works fine.

iG8R avatar Mar 02 '25 16:03 iG8R

Turns out, the issue stemmed from the "Enable Rich Text Translation" setting in Immersive Translate. Disabling that seems to have resolved everything.

iG8R avatar Mar 02 '25 17:03 iG8R

Turns out, the issue stemmed from the "Enable Rich Text Translation" setting in Immersive Translate. Disabling that seems to have resolved everything.

I will take a look at it later and adapt it to the official rich text translation. DeepLX has this feature, but the activation method may be different. I will adapt it.

missuo avatar Mar 02 '25 17:03 missuo

I have 4 vps running Deeplx service, 2 vps is working well, and another 2 return "503". They are all installed latest version v1.0.6. They are all working well yesterday after upgrading to v1.0.6, but 2 of them are found not woring well this morning.

Gol2dragon avatar Mar 03 '25 04:03 Gol2dragon

I'm also having some issues, the first 3 lines, in Subtitel Edit, works, then goes to error: 503

Image

skeemolesen avatar Mar 04 '25 04:03 skeemolesen

在通过 pot 翻译软件使用的时候,只能翻译四五次左右,就会反馈 503。

OwO996 avatar Mar 05 '25 18:03 OwO996

Turns out, the issue stemmed from the "Enable Rich Text Translation" setting in Immersive Translate. Disabling that seems to have resolved everything.

I will take a look at it later and adapt it to the official rich text translation. DeepLX has this feature, but the activation method may be different. I will adapt it.

I am trying to reproduce, and got this. Encrease the API call throttle like 50 times/sec, the https://www2.deepl.com/jsonrpc API will return 429 staus code. The deeplx will return 503 status code.

I am not sure how to solve this, maybe it's Deepl throttle the IP.

REQUEST

POST http://192.168.3.101:8888/translate?token=123 HTTP/1.1
Host: 192.168.3.101:8888
User-Agent: Fiddler-Everywhere
Content-Length: 61

{"source_lang":"EN","target_lang":"ZH","text":"Hello World."}

RESPONSE

HTTP/1.1 503 Service Unavailable
Content-Type: application/json; charset=utf-8
Date: Sun, 16 Mar 2025 17:10:32 GMT
Content-Length: 43

{"code":503,"message":"Translation failed"}

REQUEST

POST https://www2.deepl.com/jsonrpc HTTP/2
host: www2.deepl.com
content-type: application/json
accept: */*
x-app-os-version: 18.4.0
x-app-device: iPhone16,2
x-app-build: 1627620
x-app-version: 25.1
accept-language: en-US,en;q=0.9
accept-encoding: gzip, deflate, br
user-agent: DeepL/1627620 CFNetwork/3826.500.62.2.1 Darwin/24.4.0
x-app-os-name: iOS
referer: https://www.deepl.com/
x-product: translator

{"jsonrpc":"2.0","method": "LMT_handle_jobs","id":8366267000,"params":{"commonJobParams":{"formality":"undefined","transcribe_as":"romanize","mode":"translate","wasSpoken":false,"advancedMode":false,"textType":"plaintext"},"lang":{"source_lang_user_selected":"auto","target_lang":"ZH","source_lang_computed":"EN"},"jobs":[{"kind":"default","preferred_num_beams":4,"raw_en_context_before":[],"raw_en_context_after":[],"sentences":[{"prefix":"","text":"Hello World.","id":0}]}],"timestamp":1742145030193}}

RESPONSE

HTTP/2 429
date: Sun, 16 Mar 2025 17:10:31 GMT
content-type: application/json; charset=utf-8
set-cookie: LMTBID=v2|94e417d4-a2fc-4eae-acde-f457b4e08ac6|8eb9a9c24dcb91f5a7c3c0260f861a67; Version=1; Path=/; Domain=.deepl.com; Secure; HttpOnly; Expires=Tue, 16-Sep-2025 00:00:00 GMT
access-control-expose-headers: Server-Timing, X-Trace-ID
x-trace-id: e054a1c9aee741398e2b612cef4f5961
server-timing: l7_lb_tls;dur=299, l7_lb_idle;dur=299, l7_lb_receive;dur=3, l7_lb_total;dur=303
strict-transport-security: max-age=63072000; includeSubDomains; preload

{"jsonrpc":"2.0","id":-223667592,"error":{"code":1042911,"message":"Too many requests"}}

ZHLONG-CN avatar Mar 16 '25 17:03 ZHLONG-CN

At first, disabling "Enable translation with formatting" helped, but now it only works for the first 4 requests, after which DeepLX starts responding with only error 503.

iG8R avatar Mar 16 '25 17:03 iG8R

I brought up this issue in the Immersive Translate thread and was advised to ask if DeepLX supports the tag_handling parameter. https://github.com/immersive-translate/immersive-translate/issues/2626#issuecomment-2729358977

tag_handling: "html"

iG8R avatar Mar 17 '25 15:03 iG8R