Skip to content

Large multipart/form-data request abortion #10433

Open
@philosophocat

Description

Reproduction

If the request body is small, everything works fine.
If a file is attached (for example, 15 MB) request hangs

export const action: ActionFunction = async (props) => {
    throw new Response(null, {
        status: 400
    });
}

If I add req.destroy() somewhere here, the request does not hang, but ends with NS_ERROR_NET_RESET, which is clearly not the desired behavior.

System Info

System:
  OS: macOS 14.3.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 2.51 GB / 32.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 22.11.0 - /usr/local/bin/node
  Yarn: 1.22.22 - /usr/local/bin/yarn
  npm: 11.0.0 - /usr/local/bin/npm
Browsers:
  Firefix Developer Edition 135.0b9
  Chrome: 132.0.6834.110
  Safari: 17.3.1
npmPackages:
  @remix-run/css-bundle: ^2.15.2 => 2.15.2 
  @remix-run/dev: ^2.15.2 => 2.15.2 
  @remix-run/node: ^2.15.2 => 2.15.2 
  @remix-run/react: ^2.15.2 => 2.15.2 
  @remix-run/serve: ^2.15.2 => 2.15.2 
  vite: ^5.1.8 => 5.4.10

Used Package Manager

npm

Expected Behavior

Request aborted with expected http status

Actual Behavior

The request is waiting for a response from the server

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions