Skip to content

Files: any upload that takes longer than 5 minutes is cut off with a 408 #485

Done

Description

@nixfred

What happens

Both HTTP servers are created with Node's defaults and never change requestTimeout: http.createServer(async (req, res) => ...) in omarchyd/server.mjs (line 628, the one that receives /api/files/upload) and http.createServer(app) in server/cli.mjs (line 44, the one the browser talks to). Since Node 18 the default server.requestTimeout is 300000 ms: the whole request, body included, must arrive within 5 minutes or the server answers 408 and closes the connection. (server/app.mjs line 1352 sets requestTimeout = 0 for the relay server, so the need is known there.)

The upload route is written for long transfers (the proxy allows 12 hours, server/app.mjs around line 1100), but a big file over Wi-Fi or a slow link, for example a 10 GB video at 20 MB/s, takes more than 300 seconds and fails part way through. In the app it shows as an upload error after five minutes, and the file has to be copied some other way.

How to reproduce

A plain http.createServer with default settings (the same construction as omarchyd), and a client that sends a Content-Length: 1000000 POST but only 100 bytes every 2 seconds (the connection is never idle):

300017 HTTP/1.1 408 Request Timeout

(node -e "console.log(require('http').createServer().requestTimeout)" prints 300000 on Node 26.)

Expected: the upload keeps going while data is arriving.

Suggested fix

Set server.requestTimeout = 0 (and keep headersTimeout) on the omarchyd and web servers, as is already done for the relay server.

Environment

Omarchy Server main (6aa7f7d, 0.9.52), Node 26.

Activity

  1. nixfred commented on Nov 23, 2026

    @nixfred
    CollaboratorAuthor

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    🤖 Generated with Claude Code (Larry:Prime for @nixfred)

  2. added a commit that references this issue on Dec 5, 2026
    717365b
  3. calledtoconstruct commented on Dec 5, 2026

    @calledtoconstruct
    Collaborator

    Thank you @nixfred. A long upload now has the same 12 hour ceiling the relay already used, and only while the file is arriving. Merged in #935.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions