[ 
https://issues.apache.org/jira/browse/TIKA-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18139106#comment-18139106
 ] 

Hudson commented on TIKA-5025:
------------------------------

SUCCESS: Integrated in Jenkins build Tika ยป tika-main-jdk17 #1776 (See 
[https://ci-builds.apache.org/job/Tika/job/tika-main-jdk17/1776/])
TIKA-5025: Set the server block's fields from the command line and environment 
(TIKA_SERVER_SETTING_<FIELD>) (#3519) (github: 
[https://github.com/apache/tika/commit/82141b62485e6b0db7f2eb3388d33ad14b6e9463])
* (edit) CHANGES.txt
* (add) 
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/ServerSettingsIntegrationTest.java
* (edit) docs/modules/ROOT/pages/using-tika/docker.adoc
* (edit) 
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerCli.java
* (edit) 
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
* (edit) 
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/MaxRequestSizeFilter.java
* (edit) 
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
* (edit) 
tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/TikaServerConfigTest.java
* (edit) docs/modules/ROOT/pages/using-tika/server/index.adoc


> tika-server: set the request limits from the environment and the command line
> -----------------------------------------------------------------------------
>
>                 Key: TIKA-5025
>                 URL: https://issues.apache.org/jira/browse/TIKA-5025
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> Since TIKA-4988 the Docker image runs a thumbnail server with nothing but -e 
> TIKA_PRESETS=thumbnail. The first file over 1 GiB brings the config file 
> back: maxRequestSizeBytes (TIKA-4991, default 1073741824) lives in the server 
> block of the JSON config and can only be changed by mounting a file and 
> passing -c. The same goes for its siblings maxInFlightRequestBytes, 
> maxRequestReadMillis, maxResponseWriteMillis and maxQueuePauseMillis. 
> Measured on 4.2.1-SNAPSHOT with a 1.46 GB MPEG-4 audiobook: PUT 
> /unpack/preset/thumbnail answers 413 "Request body exceeds 
> maxRequestSizeBytes" from the declared Content-Length alone; with {"server": 
> {"maxRequestSizeBytes": 4294967296}, "presets": {"thumbnail": true}} the 
> cover comes back in 4 s.
> Proposal: every setting of the server block can be given as 
> TIKA_SERVER_<UPPER_SNAKE_CASE> in the environment, e.g. 
> TIKA_SERVER_MAX_REQUEST_SIZE_BYTES=4294967296, and as --server-<kebab-case> 
> <value> on the command line, following TIKA-4988: both are merged into the 
> startup config before the front end and the forked workers load it, so the 
> forks keep receiving the resolved config over stdin and never read the 
> environment; command line and environment win over the file; an unknown key 
> fails startup; the startup log says where a value came from. Sizes accept the 
> plain byte count, suffixes (4g) would be nice but are a separate decision.
> Also: the 413 body should name the limit and where to raise it, as the preset 
> 404 does, so an operator reads the answer instead of the server log.
> Docs: the server page's limits section and the Docker page get the env form 
> next to the config form.
> Related: TIKA-4988 (TIKA_PRESETS), TIKA-4991 (the limits), TIKA-4909 (env 
> interpolation inside a config file, which still needs the file).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to