Documentation for request body size limit

Hi,

I’d appreciate if you guys could document your platform limitations a little better.
There were no response to this post, but we found out the hard way that there’s a 200kb request body limit, and it seems like a TCP reset will happen when exceeded.

That was causing broken pipe errors on our golang http client.
It is not documented anywhere so I end up spent like half a day to debug, nail down the issue, test and verify it.

It’ll save us and our customers a lot of back and forths + time if this was simply documented.

That’s not a limit. Something else must be going on.

Request bodies are streaming, there’s a little bit of buffering going on, but that’s only for fly-replay header users.

Are clients uploading these bodies particularly slow?

Can you tell us which app this is happening on?

I see you’ve linked to a repo which I can only assume is a reproduction, but can you also outline how you’re interacting with the flydebug app to recreate the issue?

Sure, I’ll update the README to have it deployable so you can see it as well.

I’ve updated the README with the instructions to get it reproducing the issue.

Are clients uploading these bodies particularly slow?

No, these are just text, can be JSON but generally just strings, that can become pretty sizable

Can you tell us which app this is happening on?

Assuming you’re talking about the lang and framework, it’s Remix and Typescript

Can I get you to try a smaller test?

server.js:

const express = require('express');
const bodyParser = require('body-parser');

const app = express();
app.use(bodyParser.text({limit: '64MB'}));

app.post('/', (req, res) => {
    res.send(req.body.length.toString());
});

app.listen(3000, () => console.log(`Started server on port 3000`));

client.js:

const fs = require('node:fs').promises;

(async () => {
  let toml = await fs.readFile('fly.toml', 'utf-8');
  let app = toml.match(/^app\s*=\s*"(.*?)"/m)[1];

  let data = "1";
  for (let i=0; i<27; i++) {
    await fetch(`https://${app}.fly.dev/`, {
      method: 'POST',
      body: data
    })
    .then(response => response.text())
    .then(console.log)
    data += data
  }
})()

package.json:

{
  "name": "reqbody",
  "version": "1.0.0",
  "description": "request body size test",
  "main": "server.js",
  "scripts": {
    "start": "node server.js",
    "client": "node client.js"
  },
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.20.2",
    "express": "^4.18.2"
  },
  "devDependencies": {
    "@flydotio/dockerfile": "^0.4.10"
  }
}

@darwinings this line is particularly relevant

We think since Remix uses Express and the default max body size w/ it is 100KB, that’s where the culprit might be.

Mind if I try this in a couple days time?
Hopefully before the bot closes the post.
Just got other urgent matters to take care of before revisiting this issue.

Just keep replying to keep this open :slight_smile:

Summary of where we are so far:

  • Combination of the flydebug app, Inngest, Remix and fly.io has a 200kb request body limit
  • A properly configured express app on fly.io can upload 64MB

I suspect that there is a configuration error someplace, but I don’t know enough to speculate where.

Another thing to try is running locally with the Dockerfile that is produced.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.