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

More options for custom body files forms #2298

Closed
cethap opened this issue Dec 14, 2021 · 5 comments
Closed

More options for custom body files forms #2298

cethap opened this issue Dec 14, 2021 · 5 comments
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature

Comments

@cethap
Copy link

cethap commented Dec 14, 2021

Feature Description

In runtime when I try to write custom head for form body send with javascript, when the file is > to 40 mb the ram is elevated to max and OS kill the porcess.

Example for custom body builder
image

Normal Use:
image

When execute script with custom body
2021-12-14_13-33

Suggested Solution (optional)

I Suggest can have options for build custom head of body forms for correct binding of big files

Already existing or connected issues / PRs (optional)

No response

@cethap cethap added the feature label Dec 14, 2021
@na--
Copy link
Member

na-- commented Dec 15, 2021

Can you please explain in more details what exactly are you trying to do, I don't understand what you mean by "head of body" 😕 Also, do you want to have a unique request body in every VU/iteration/request? Or will it be the same?

Because if it's the same, #1931 (currently WIP) should solve the issue, right? And if it's unique for every request, I am not sure how exactly we can reduce RAM usage with 40+MB uploads... 😕 Maybe some sort of a streaming API (#592) / generator-based on-demand construction of request bodies?

@na-- na-- added awaiting user waiting for user to respond evaluation needed proposal needs to be validated or tested before fully implementing it in k6 labels Dec 15, 2021
@cethap
Copy link
Author

cethap commented Dec 15, 2021

Yes It's like a join both, because in this moment I need upload large file to service but the custom body form-data that generate k6 for default is not work for me, then I build a custom body byte array with the correct format for my service (based in Advanced multipart request polyfill), but in this building and when I send http request the memory of my computer rise up in seconds.

When I try to upload without use the polyfill, the memory behavior is normal but the request fails for the above explanation

@na--
Copy link
Member

na-- commented Dec 15, 2021

Do you want to upload the exact same request body in every request?

@cethap
Copy link
Author

cethap commented Dec 15, 2021

Yes, but in one alone request I can see the excessive memory rise up

@na--
Copy link
Member

na-- commented Dec 22, 2021

I'm closing this in favor of #2311 and/or #1931. Those issues explore the underlying technical issues and potential solutions for the problem of k6 using too much RAM when users want to upload big files.

@na-- na-- closed this as completed Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature
Projects
None yet
Development

No branches or pull requests

2 participants