Skip to content

Add OVERPASS_MAX_SIZE argument to set nginx max size#170

Open
jnewb1 wants to merge 3 commits into
wiktorn:masterfrom
jnewb1:patch-1
Open

Add OVERPASS_MAX_SIZE argument to set nginx max size#170
jnewb1 wants to merge 3 commits into
wiktorn:masterfrom
jnewb1:patch-1

Conversation

@jnewb1

@jnewb1 jnewb1 commented Jun 4, 2026

Copy link
Copy Markdown

I have been recieving this error for some large overpass API requests. nginx defaults to a 1M max request which can be exceeded by some requests.

File "/usr/local/lib/python3.12/dist-packages/osmnx/_http.py", line 320, in _parse_response
raise ResponseStatusCodeError(msg) from e
osmnx._errors.ResponseStatusCodeError: '127.0.0.1' responded: 413 Request Entity Too Large <html>

@jnewb1 jnewb1 marked this pull request as ready for review June 4, 2026 21:35
@jnewb1 jnewb1 changed the title Increase nginx client_max_body_size Add OVERPASS_MAX_SIZE argument to set nginx max size Jun 8, 2026
Comment thread docker-entrypoint.sh

# 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}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the default size is 1MiB (https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) you could argue that it should be the default value here as well. But that's only nitpicking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants