Skip to content

Commit

Permalink
Make the number fgci processes configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Valsecchi committed Apr 10, 2019
1 parent 824b6af commit 7ba8ef8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ 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
Expand Down
4 changes: 3 additions & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ COPY target /usr/local/

ENV MS_DEBUGLEVEL=0 \
MS_ERRORFILE=/var/log/mapserver.log \
MAX_REQUESTS_PER_PROCESS=1000
MAX_REQUESTS_PER_PROCESS=1000 \
MIN_PROCESSES=1 \
MAX_PROCESSES=5

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
2 changes: 2 additions & 0 deletions server/runtime/etc/apache2/conf-enabled/mapserver.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# mapserver has memory leaks, this limit should improve long term memory usage
FcgidMaxRequestsPerProcess ${MAX_REQUESTS_PER_PROCESS}
FcgidMinProcessesPerClass ${MIN_PROCESSES}
FcgidMaxProcessesPerClass ${MAX_PROCESSES}

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

0 comments on commit 7ba8ef8

Please sign in to comment.