Skip to content

Commit

Permalink
Make LimitRequestLine configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 12, 2023
1 parent cf43049 commit a8c4a0f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ ENV MS_DEBUGLEVEL=0 \
MAX_PROCESSES=5 \
BUSY_TIMEOUT=300 \
IDLE_TIMEOUT=300 \
IO_TIMEOUT=40
IO_TIMEOUT=40 \
APACHE_LIMIT_REQUEST_LINE=8190

RUN adduser www-data root && \
chmod -R g+w ${APACHE_CONFDIR} ${APACHE_RUN_DIR} ${APACHE_LOCK_DIR} ${APACHE_LOG_DIR} /etc/confd /etc/mapserver /var/lib/apache2/fcgid /var/log && \
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ create a file at the same location, with just the `.tmpl` extension removed.
You can use the following environment variables (when starting the container)
to tune it:

- MS_DEBUGLEVEL: The debug level 0=off 5=verbose
- MS_ERRORFILE: If you want the debug to something other than STDOUT
- MAX_REQUESTS_PER_PROCESS: To work around memory leaks (defaults to 1000)
- MIN_PROCESSES: The minimum number of fcgi processes to keep (defaults to 1)
- MAX_PROCESSES: The maximum number of fcgi processes to keep (defaults to 5)
- MAPSERVER_CATCH_SEGV: Set to 1 to have the stacktraces in case of crash
- LISTEN_PORT_80: When running the container as an unprivileged user, apache
will listen to port 8080 instead of 80. Set to 1 force listening to port 80
- `MS_DEBUGLEVEL`: The debug level `0`=off `5`=verbose
- `MS_ERRORFILE`: If you want the debug to something other than STDOUT
- `MAX_REQUESTS_PER_PROCESS`: To work around memory leaks (defaults to `1000`)
- `MIN_PROCESSES`: The minimum number of fcgi processes to keep (defaults to `1`)
- `MAX_PROCESSES`: The maximum number of fcgi processes to keep (defaults to `5`)
- `MAPSERVER_CATCH_SEGV`: Set to 1 to have the stacktraces in case of crash
- `LISTEN_PORT_80`: When running the container as an unprivileged user, apache
will listen to port `8080` instead of `80`. Set to 1 force listening to port `80`
instead.
- BUSY_TIMEOUT: The maximum time limit for request handling (defaults to 300)
- IDLE_TIMEOUT: Application processes which have not handled a request for
this period of time will be terminated (defaults to 300)
- IO_TIMEOUT: The maximum period of time the module will wait while trying to
read from or write to a FastCGI application (defaults to 40)
- `BUSY_TIMEOUT`: The maximum time limit for request handling (defaults to `300`)
- `IDLE_TIMEOUT`: Application processes which have not handled a request for
this period of time will be terminated (defaults to `300`)
- `IO_TIMEOUT`: The maximum period of time the module will wait while trying to
read from or write to a FastCGI application (defaults to `40`)
- `APACHE_LIMIT_REQUEST_LINE`: The maximum size of the HTTP request line in
bytes (defaults to `8190`)

## Running multiple mapfiles

Expand Down
1 change: 1 addition & 0 deletions runtime/etc/apache2/conf-enabled/mapserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FcgidMaxProcessesPerClass ${MAX_PROCESSES}
FcgidBusyTimeout ${BUSY_TIMEOUT}
FcgidIdleTimeout ${IDLE_TIMEOUT}
FcgidIOTimeout ${IO_TIMEOUT}
LimitRequestLine ${APACHE_LIMIT_REQUEST_LINE}

ScriptAliasMatch "^/.*" /usr/local/bin/mapserv_wrapper
<Location />
Expand Down

0 comments on commit a8c4a0f

Please sign in to comment.