software/languagetool: raise the Java heap and limit the text size
The LanguageTool server loads the resources of a language on the first check in that language. The resources stay in memory. With a 512 MB heap, the resources of a few languages exhaust the heap and the JVM stops with OutOfMemoryError.
Run the JVM with a 2 GB heap. Reject any request that carries more than 20000 characters with a server configuration file, because one large request can exhaust the heap. Exit the JVM when the heap is exhausted, so that slapgrid starts the service again.
Co-Authored-By: AI agent ai-agent@noreply