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

Streaming request body #622

Closed
vincent-163 opened this issue Aug 7, 2019 · 16 comments
Closed

Streaming request body #622

vincent-163 opened this issue Aug 7, 2019 · 16 comments

Comments

@vincent-163
Copy link

Hello! First of all, thanks for the awesome work.

I'm building a simple file server that receives files from clients. The files are presented in the raw request body (i.e. no multipart/form-data), and file sizes can be several hundred megabytes large. fasthttp seems to have a small default request body limit (4MB), and when I try to increase that limit via MaxRequestBodySize I get out of memory error when uploading large files. Is there a way to stream request body directly so it uses only constant memory?

@kirillDanshin
Copy link
Collaborator

Currently working on/testing this feature

@erikdubbelboer
Copy link
Collaborator

At the moment not. By design fasthttp waits until the whole request is in memory before it calls the handler. @kirillDanshin is working on changing this so keep an eye on this repo.

@tsingson
Copy link

tsingson commented Aug 7, 2019

Currently working on/testing this feature

cool..........

@ochanism
Copy link

ochanism commented Dec 2, 2019

@kirillDanshin Could you update your progress?

@Fenny
Copy link
Contributor

Fenny commented Dec 30, 2019

Any updates? Seems like a big thing

@kirillDanshin
Copy link
Collaborator

sorry for delay.

this feature is currently in production testing. had to reimplement it again due to insufficient performance.

@erikdubbelboer
Copy link
Collaborator

@kirillDanshin can you maybe make a pull request already (maybe in Draft mode?) so people can look at the code?

@dfirsht
Copy link
Contributor

dfirsht commented Feb 14, 2020

@kirillDanshin any updates on this?

@johnlanni
Copy link

@kirillDanshin Could you update your progress?

@Fenny
Copy link
Contributor

Fenny commented Apr 15, 2020

@kirillDanshin could you share what you got so far, maybe we could help?

@taoyuanyuan
Copy link

@kirillDanshin could you share your code ?

@refine36
Copy link

@kirillDanshin any updates on this?

@iarkaroy
Copy link

@kirillDanshin any update on this?

kirillDanshin added a commit that referenced this issue Nov 8, 2020
Signed-off-by: Kirill Danshin <kirill@danshin.pro>
@jan4984
Copy link

jan4984 commented Dec 9, 2020

any update? i use the issue-622 branch and it totally not work. the handler blocking at 'appendBodyFixedSize'.

@kirillDanshin
Copy link
Collaborator

@jan4984 please provide an example of this issue

@frankdvd
Copy link

@kirillDanshin Thank you so much for your work, this is a really helpful feature, any idea on when the PR will be merged?

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

No branches or pull requests