Closed grandeljay closed 7 months ago
Yes, you are running into a limitation of the API - requests must be below 128K in size (to stay within that limit, we recommend to limit texts to translate to 105-110KB). We don't handle larger texts in the client libraries yet (e.g. by splitting a large request into multiple smaller ones), since we want to ensure maximum translation quality and it's not easily possible to split a text while preserving this quality. Do you see a way to adhere to that limit, even for a larger WP post? (Also please note, we do not provide the WP Plugin but the Client library it uses.)
API - requests must be below 128K in size
Alright, good to know!
We don't handle larger texts in the client libraries yet (e.g. by splitting a large request into multiple smaller ones), since we want to ensure maximum translation quality and it's not easily possible to split a text while preserving this quality.
That's no problem for me. I was just trying to find a way to determine what the POST max size is, so I can enforce it. Now I know, thanks!
Do you see a way to adhere to that limit, even for a larger WP post?
My plugin is actually a simple UI for translating structured content (html, xml), since I don't believe DeepL offers a GUI for that anywhere. I'll just simply limit the input to ~110 KiB
I am trying to translate 1009 lines of text (312 KiB) in a single
POST
request via a WordPress plugin I created and can't due to a generic internal server error (HTTP 500). After inspecting the logs, I found this client error:I've done some brief research, to find that the maximum possible size of a POST request is limited by the server, as well as the client by doing something like:
min(serverMaxSize, clientMaxSize)
. Since it's a HTTP 4xx error, I presume the fault lies within the library/client here?php.ini
), which look fine to me:max_input_vars
max_execution_time
memory_limit
max_input_time
upload_max_filesize
post_max_size
Any ideas are greatly appreciated! Thanks for making this open source!