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

Windows 10 - Bruno cannot start/hangs/get killed when a request body is too large #223

Open
l0new4nder3r opened this issue Sep 27, 2023 · 7 comments · May be fixed by #3618
Open

Windows 10 - Bruno cannot start/hangs/get killed when a request body is too large #223

l0new4nder3r opened this issue Sep 27, 2023 · 7 comments · May be fixed by #3618

Comments

@l0new4nder3r
Copy link

v0.15.2
Bruno cannot start/hangs/get killed (app not responding, one thread gets stuck or takes too long to answer?) when a request has a large XML body.

This request was in a postman collection, it worked in Postman (even though postman took a few seconds to open the "body" tab).
The test itself was to validate that an API was able to handle a large content

The xml body line count is around 210200 lines in the "bru" file.
The file itself weighs 17-18Mb

@helloanoop
Copy link
Contributor

Hi @l0new4nder3r

Can you try this for the test.
Instead of directly saving this in the bru file, create a separate file to store the large data
You can open the collection in an editor and do this.

|- collection
| |- data
| | |- large-xml.js
| | request.bru
| | bruno.json

large-xml.js

module.exports = `
  <xml>
  ...
  </xml>
`;

In the pre-request script in request.bru you can add

const largeXml = require("./data/large-xml");

req.setBody(largeXml);

PS: We definitely need to fix the performance issue, just suggesting a workaround for your test.

@l0new4nder3r
Copy link
Author

Hi,

Thanks for the quick replies!

I tried that, and at least the app doesn't break because of this request in the collection :)

When trying to call the API, I got this error in bruno

Error invoking remote method 'send-http-request': Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit

Which makes some sense if there is a hard coded limit somewhere for the body length.
I reckon this is not a high priority use case.

Is this "body length" parameter" maybe overridable in some way?

@helloanoop
Copy link
Contributor

@l0new4nder3r Bruno uses axios underneath. It appears to be an axios config related issue.

Will have this fixed in the next release.

https://stackoverflow.com/questions/58655532/increasing-maxcontentlength-and-maxbodylength-in-axios

@helloanoop
Copy link
Contributor

@ganesh-bruno Can you try to reproduce this issue using a large payload?

@ganesh-bruno
Copy link
Collaborator

I tested this with files around 25MB, the performance was clearly degraded.

@ganesh-bruno ganesh-bruno added mid-term-goal Mid Term Goal and removed bug Something isn't working labels Oct 25, 2024
@helloanoop helloanoop added long-term-goal and removed mid-term-goal Mid Term Goal labels Nov 30, 2024
@HachiJuu
Copy link

HachiJuu commented Dec 2, 2024

Any news on this issue? I'm trying to post a large set of data, 65MB, and Bruno just hangs and I have to kill it

@Its-treason
Copy link
Member

Any news on this issue? I'm trying to post a large set of data, 65MB, and Bruno just hangs and I have to kill it

No good news yet. The problem here is that the .bru parser is kinda slow and transfering this much data over IPC causes lag / needs a lot of memory.

As a workaround: I would suggest putting the body into a seperate file and set the body inside the pre-request script. See: #385 (comment)

@lohxt1 lohxt1 linked a pull request Dec 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants