Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum request body size 1048576 exceeded, actual body size 1049648 #4474

Closed
Th0rgal opened this issue Dec 30, 2019 · 4 comments
Closed

Maximum request body size 1048576 exceeded, actual body size 1049648 #4474

Th0rgal opened this issue Dec 30, 2019 · 4 comments
Labels
question StackOverflow

Comments

@Th0rgal
Copy link

Th0rgal commented Dec 30, 2019

Long story short

I'm trying to uploads small files (less than 120MiB) to my server written with aiohttp but when they are a little too bigs it doesn't work.

Expected behaviour

The request should be handled.

Actual behaviour

The server returns:
Maximum request body size 1048576 exceeded, actual body size 1049648

Steps to reproduce

Clone my small server polymath: https://github.com/Th0rgal/Polymath/blob/master/server.py
Perform:
curl -F "pack=@./file.zip" -F "id=666599" -X POST http://localhost:8080/upload

Your environment

My server runs under nixos 19.09 (linux 5.4.6) and I get this error with any clients (windows, ubuntu, nixos, etc).

Is there a way to change this limit server-sidely?

@hh-h
Copy link
Contributor

hh-h commented Jan 1, 2020

client_max_size – client’s maximum size in a request, in bytes. If a POST request exceeds this value, it raises an HTTPRequestEntityTooLarge exception.

https://aiohttp.readthedocs.io/en/stable/web_reference.html#aiohttp.web.Application

@Th0rgal
Copy link
Author

Th0rgal commented Jan 2, 2020

client_max_size – client’s maximum size in a request, in bytes. If a POST request exceeds this value, it raises an HTTPRequestEntityTooLarge exception.

https://aiohttp.readthedocs.io/en/stable/web_reference.html#aiohttp.web.Application

Thank you!

@Th0rgal Th0rgal closed this as completed Jan 2, 2020
@Harmon758 Harmon758 added the question StackOverflow label Jan 2, 2020
@hh-h
Copy link
Contributor

hh-h commented Jan 2, 2020

Yw, but issues not for questions, see: #4257

@ben-8878

This comment has been minimized.

@aio-libs aio-libs locked as resolved and limited conversation to collaborators Sep 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question StackOverflow
Projects
None yet
Development

No branches or pull requests

4 participants