emacs-languagetool / flycheck-languagetool

Flycheck support for LanguageTool
GNU General Public License v3.0
54 stars 8 forks source link

HTTP/1.1 413 Request Entity Too Large #31

Open jcubic opened 5 months ago

jcubic commented 5 months ago

I'm working on a markdown file of 850 lines with no more than 100 characters per line (most of the file are code snippets) And got this error:

Debugger entered--Lisp error: (error "Error from syntax checker languagetool: peculiar e...")
  error("Error from syntax checker languagetool: peculiar e...")
  flycheck-languagetool--read-results((:error (error http 413) :peer (:certificates ((:version 3 :serial-number "04:32:23:0d:c0:e2:4b:c5:48:7a:a2:8e:e7:b9:d0:85:85..." :issuer "C=US,O=Let's Encrypt,CN=R3" :valid-from "2024-01-08" :valid-to "2024-04-07" :subject "CN=api.languagetool.org" :public-key-algorithm "EC/ECDSA" :certificate-security-level "High" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:fc:a1:fe:82:43:48:85:8b:68:6e:72:6b:f7:45:d7:..." :certificate-id "sha1:a4:ff:e0:7a:47:de:34:0e:49:2b:13:39:fa:b7:4b:..." :pem "-----BEGIN CERTIFICATE-----\nMIIEKjCCAxKgAwIBAgISBD...") (:version 3 :serial-number "00:91:2b:08:4a:cf:0c:18:a7:53:f6:d6:2e:25:a7:5f:5a" :issuer "C=US,O=Internet Security Research Group,CN=ISRG Ro..." :valid-from "2020-09-04" :valid-to "2025-09-15" :subject "C=US,O=Let's Encrypt,CN=R3" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:8a:93:82:f4:c8:04:08:34:5e:5b:c2:f8:d7:55:d3:..." :certificate-id "sha1:a0:53:37:5b:fe:84:e8:b7:48:78:2c:7c:ee:15:82:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFFjCCAv6gAwIBAgIRAJ...") (:version 3 :serial-number "40:01:77:21:37:d4:e9:42:b8:ee:76:aa:3c:64:0a:b7" :issuer "O=Digital Signature Trust Co.,CN=DST Root CA X3" :valid-from "2021-01-20" :valid-to "2024-09-30" :subject "C=US,O=Internet Security Research Group,CN=ISRG Ro..." :public-key-algorithm "RSA" :certificate-security-level "High" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:f8:16:51:3c:fd:1b:44:9f:2e:6b:28:a1:97:22:1f:..." :certificate-id "sha1:93:3c:6d:de:e9:5c:9c:41:a4:0f:9f:50:49:3d:82:..." :pem "-----BEGIN CERTIFICATE-----\nMIIFYDCCBEigAwIBAgIQQA...")) :certificate (:version 3 :serial-number "04:32:23:0d:c0:e2:4b:c5:48:7a:a2:8e:e7:b9:d0:85:85..." :issuer "C=US,O=Let's Encrypt,CN=R3" :valid-from "2024-01-08" :valid-to "2024-04-07" :subject "CN=api.languagetool.org" :public-key-algorithm "EC/ECDSA" :certificate-security-level "High" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:fc:a1:fe:82:43:48:85:8b:68:6e:72:6b:f7:45:d7:..." :certificate-id "sha1:a4:ff:e0:7a:47:de:34:0e:49:2b:13:39:fa:b7:4b:..." :pem "-----BEGIN CERTIFICATE-----\nMIIEKjCCAxKgAwIBAgISBD...") :key-exchange "ECDHE-RSA" :protocol "TLS1.3" :cipher "AES-256-GCM" :mac "AEAD" :encrypt-then-mac nil)) #<buffer core.md> #f(compiled-function (&rest args) #<bytecode -0x13327cfdd83823e6>))
  url-http-activate-callback()
  url-http-content-length-after-change-function(296 406 110)
  url-http-wait-for-headers-change-function(1 415 414)
  url-http-generic-filter(#<process api.languagetool.org> "HTTP/1.1 413 Request Entity Too Large\15\nserver: nginx/1.24.0\15\ndate: Thu, 29 Feb 2024 16:29:05 GMT\15\ncontent-length: 109\15\naccess-control-allow-origin: *\15...")

Is there a way to split the payload when it's too big and send it via a few requests?

jcs090218 commented 5 months ago

Sorry, very busy recently. I'll take a look when I have time.

real-or-random commented 1 month ago

You're hitting the (sadly very low) API limits, see https://github.com/valentjn/ltex-ls/issues/215 for the same issue when using lsp.