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

[Single Fetch] async data timeouts after 5 seconds #10229

Open
Aleuck opened this issue Nov 14, 2024 · 1 comment
Open

[Single Fetch] async data timeouts after 5 seconds #10229

Aleuck opened this issue Nov 14, 2024 · 1 comment

Comments

@Aleuck
Copy link

Aleuck commented Nov 14, 2024

Reproduction

  1. Set ABORT_DELAY to longer than 5 seconds (I used 120 seconds);
  2. Create a loader that returns a promise that takes more than 5 seconds to resolve (I used 5.5 seconds); and
  3. Test with and without Single Fetch.

Repository with reproduction below:

🚫 Timeout with SingleFetch - branch: main

Works without SingleFetch - branch: working-no-single-fetch

System Info

System:
    OS: macOS 14.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 635.59 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.asdf/installs/nodejs/20.12.2/bin/node
    Yarn: 1.22.22 - ~/.asdf/installs/nodejs/20.12.2/bin/yarn
    npm: 10.9.0 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 9.10.0 - ~/.asdf/installs/nodejs/20.12.2/bin/pnpm
  Browsers:
    Chrome: 130.0.6723.117
    Safari: 18.0.1
  npmPackages:
    @remix-run/dev: ^2.14.0 => 2.14.0
    @remix-run/node: ^2.14.0 => 2.14.0
    @remix-run/react: ^2.14.0 => 2.14.0
    @remix-run/serve: ^2.14.0 => 2.14.0
    vite: ^5.1.0 => 5.4.11

Used Package Manager

npm

Expected Behavior

Request succeeds in both examples

Actual Behavior

Request succeeds with single fetch disabled but timeouts when it is enabled.

@syaraf-az
Copy link

I think you missed this docs:-
Single Fetch: Streaming Timeout

I encountered the same issues previously where the streaming is timed out in production but not on local environment (since the promise resolve quite fast compared to production) and it took me a while to find this section that explain that there is seperate timeout setting for streaming data.

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

No branches or pull requests

2 participants