Back to LanguageTool Homepage - Privacy - Imprint

Too many parallel requests

I am seeing the error languagetool/LanguageToolHttpHandler.java at master · languagetool-org/languagetool · GitHub on a self-hosted LT instance.

Generally I have loads of CPU capacity left over but limited on memory. Is there a setting I can adjust or does it indicate that I need more memory?

FTR still haven’t managed to integrate Sentry into LanguageTool :-/

Have you tried increasing maxCheckThreads and/or maxWorkQueueSize?

I left all of this to defaults I think. My server.properties contains

maxTextLength=50000
cacheSize=3000
# 1. If you use one or more of English, French, German, Spanish, download ngram data from
# http://languagetool.org/download/ngram-data/ (English: en, French: fr, German: de, Spanish: es)
# 2. Unzip the ngram data files. If you have downloaded English and German, the content of this
# directory would be sub directories named „de“ and „en“.
#languageModel=/home/languagetool/ngram-data
pipelineCaching=true
maxPipelinePoolSize=500
pipelineExpireTimeInSeconds=3600
pipelinePrewarming=true
# maxCheckThreads=6 and maxWorkQueueSize=100 are good values for a server
# with 8 cores. For more cores, increase these values accordingly, e.g. double the number for
# 16 instead of 8 cores.
maxCheckThreads=3
maxWorkQueueSize=50

Unless your server has only 4 cores, it probably makes sense to increase maxCheckThreads. Maybe to the number of CPU cores.

Not sure really how many cores I have, since this is on a PaaS. Will try to find out. But the rule of thumb is “# CPU cores - 1” ?

Any advice for the rule of thumb on the maxCheckThreads based on the number of available CPU cores?

No advice, but try the number of CPU cores x1 or x2.

OK thank you. I will play with the setting a bit :slight_smile: