# Invalid response: 413 Request Entity Too Large

**URL:** <https://discourse.jupyter.org/t/invalid-response-413-request-entity-too-large/13531>\
**Category:** JupyterHub\
**Tags:** jupyterhub, how-to, help-wanted\
**Created:** [March 22, 2022, 7:47am UTC](https://discourse.jupyter.org/t/invalid-response-413-request-entity-too-large/13531 "2022-03-22T07:47:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeoWelter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/leowelter/32/2664_2.png) [@LeoWelter](https://discourse.jupyter.org/u/LeoWelter)\
**Post date:** [March 22, 2022, 7:47am UTC](https://discourse.jupyter.org/t/invalid-response-413-request-entity-too-large/13531/1 "2022-03-22T07:47:44Z")

</div>

I have a jupyterhub running behind nginx proxy, but I regularly get:  
Invalid response: 413 Request Entity Too Large

even with small notebooks. Any ideas how to get this working?  
Below is my nginx config:

```auto
map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
}

upstream upstream_jupyter {
    server 127.0.0.1:8000;
    keepalive 32;
}

# HTTP server to redirect all 80 traffic to SSL/HTTPS
server {
    listen 80;
    listen [::]:80 default_server;

    # SSL configuration

    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    server_name none.of.your.biz;
    include snippets/certificate_geant.conf;
# include snippets/ssl-params.conf;

    # Managing literal requests to the JupyterHub front end
    location / {
        proxy_pass http://upstream_jupyter;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # websocket headers
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Scheme $scheme;
        proxy_read_timeout 86400;
        proxy_buffering off;
    }

    location /hub/error {
        proxy_pass http://127.0.0.1:8081/hub/error;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # websocket headers
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Scheme $scheme;
        proxy_read_timeout 86400;
        proxy_buffering off;
    }
}

```

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [March 22, 2022, 9:15am UTC](https://discourse.jupyter.org/t/invalid-response-413-request-entity-too-large/13531/2 "2022-03-22T09:15:08Z")

</div>

I think you want to set [client\_max\_body\_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) to 0 (disable checking) or a larger value to set the maximum size of notebooks and other files to be uploaded. See also [similar reports](https://github.com/jupyterlab/jupyterlab/issues/4214).
