From 315c1ef3d5cdabf5acc8f88013620305d3d56509 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 4 Jun 2026 17:32:40 -0400 Subject: [PATCH 1/3] Increase client_max_body_size --- etc/nginx-overpass.conf.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/nginx-overpass.conf.template b/etc/nginx-overpass.conf.template index 7f0d47d..2b95d02 100644 --- a/etc/nginx-overpass.conf.template +++ b/etc/nginx-overpass.conf.template @@ -31,6 +31,8 @@ http { gzip_proxied any; gzip_types *; + client_max_body_size 10M; + server { listen 80; server_name localhost; From b4eded61ace6c86eb35f18a4a595fbfa859447a9 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 8 Jun 2026 10:14:46 -0400 Subject: [PATCH 2/3] make it an argument --- README.md | 1 + docker-entrypoint.sh | 1 + etc/nginx-overpass.conf.template | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e7a281..79f2228 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ The following enviroment variables can be used to customize the setup: * `OVERPASS_TIME` - set the maximum amount of time units (available time). * `OVERPASS_SPACE` - set the maximum amount of RAM (available space) in bytes. * `OVERPASS_MAX_TIMEOUT` - set the maximum timeout for queries (default: 1000s). Translates to send/recv timeout for fastcgi_wrap. +* `OVERPASS_MAX_SIZE` - set the maximum size for queries (default: 10M). Translates to nginx [`client_max_body_size`](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size). * `OVERPASS_USE_AREAS` - if `false` initial area generation and the area updater process will be disabled. Default `true`. * `OVERPASS_HEALTHCHECK` - shell commands to execute to verify that image is healthy. `exit 1` in case of failures, `exit 0` when container is healthy. Default healthcheck queries overpass and verifies that there is reponse returned * `OVERPASS_STOP_AFTER_INIT` - if `false` the container will keep runing after init is complete. Otherwise container will be stopped after initialization process is complete. Default `true` diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 27dde4d..aa25d03 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -10,6 +10,7 @@ OVERPASS_CLONE_SOURCE=${OVERPASS_CLONE_SOURCE:-https://dev.overpass-api.de/api_d # this is used by other processes, so needs to be exported export OVERPASS_MAX_TIMEOUT=${OVERPASS_MAX_TIMEOUT:-1000s} +export OVERPASS_MAX_SIZE=${OVERPASS_MAX_SIZE:-10M} if [[ "$OVERPASS_META" == "attic" ]]; then META="--keep-attic" diff --git a/etc/nginx-overpass.conf.template b/etc/nginx-overpass.conf.template index 2b95d02..53c6035 100644 --- a/etc/nginx-overpass.conf.template +++ b/etc/nginx-overpass.conf.template @@ -31,8 +31,6 @@ http { gzip_proxied any; gzip_types *; - client_max_body_size 10M; - server { listen 80; server_name localhost; @@ -60,6 +58,8 @@ http { fastcgi_pass unix:/nginx/fcgiwrap.socket; fastcgi_read_timeout ${OVERPASS_MAX_TIMEOUT}; fastcgi_send_timeout ${OVERPASS_MAX_TIMEOUT}; + + client_max_body_size ${OVERPASS_MAX_SIZE}; } location /api/ { From f56de4e86873530a27ca309ad03c18336e81381c Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 8 Jun 2026 10:17:22 -0400 Subject: [PATCH 3/3] and here --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index aa25d03..e4e999f 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -128,7 +128,7 @@ if [[ ! -f /db/init_done ]]; then fi # shellcheck disable=SC2016 # ignore SC2016 (variables within single quotes) as this is exactly what we want to do here -envsubst '${OVERPASS_MAX_TIMEOUT}' /etc/nginx/nginx.conf +envsubst '${OVERPASS_MAX_TIMEOUT} ${OVERPASS_MAX_SIZE}' /etc/nginx/nginx.conf echo "Starting supervisord process" exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf