Skip to content
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

will there be huge file upload support ? #1067

Closed
yinzuojie opened this issue Aug 11, 2016 · 7 comments · Fixed by #1074
Closed

will there be huge file upload support ? #1067

yinzuojie opened this issue Aug 11, 2016 · 7 comments · Fixed by #1074
Assignees
Labels

Comments

@yinzuojie
Copy link

yinzuojie commented Aug 11, 2016

when uploading huge file ,there is MemoryError as follows.

any plan to fixed this?

ERROR:aiohttp.web:Error handling request
Traceback (most recent call last):
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\server.py", line 285, in start
yield from self.handle_request(message, payload)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web.py", line 90, in handle_request
resp = yield from handler(request)
File "D:\prog\comp.lang.python\廖2\webfx2.py", line 305, in logger
return await handler(request)
File "D:\prog\comp.lang.python\廖2\webfx2.py", line 320, in auth
return (await handler(request))
File "D:\prog\comp.lang.python\廖2\webfx2.py", line 338, in response
r = await handler(request)
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_urldispatcher.py", line 101, in handler_wrapper
result = yield from result
File "D:\prog\comp.lang.python\廖2\webfx2.py", line 211, in call
params = await request.post()
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_reqrep.py", line 347, in post
body = yield from self.read()
File "D:\soft\prog\python3\python-3.5.1\lib\site-packages\aiohttp\web_reqrep.py", line 307, in read
body.extend(chunk)
MemoryError

@yinzuojie yinzuojie changed the title huge will there be huge file upload support ? Aug 11, 2016
@asvetlov
Copy link
Member

@kxepal would you implement iterative server api, like you've done it for client.
I pretty sure existing aiohttp.multipart may be adopted for this.

@kxepal
Copy link
Member

kxepal commented Aug 11, 2016

@asvetlov Sure, will do. This should be easy.

@kxepal kxepal self-assigned this Aug 11, 2016
@kxepal
Copy link
Member

kxepal commented Aug 11, 2016

@asvetlov I fear that would be breaking compatibility change and it'll turn post coroutine into something weird. Well, it's already not good one, but at least it's consistent on what it returns.

How about to have multipart coroutine that uses multipart module for working with the request body? As like as we have text and json there.

@asvetlov
Copy link
Member

@kxepal yes, you are right.
.post() behavior mut be unchanged but we need a new coroutine for parsing request body in new way.

Feel free to add new method. Maybe .multipart() is good name, I have no strong opinion.

@kxepal
Copy link
Member

kxepal commented Aug 12, 2016

Ok, thanks.

@kxepal
Copy link
Member

kxepal commented Sep 11, 2016

N.B. Add ticket number to commit message right-before the merge to avoid such kind of spam in log /:

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants