# What fetch timeout should I set for Croct calls inside Hydrogen loaders on Oxygen?

Asked by mira_ships on 2026-11-07. Tags: hydrogen, performance, oxygen.

my loaders currently sit around 40-60ms of server time and I want to keep them
there. My worry is a slow content fetch blocking the whole response at the Oxygen
edge while a shopper stares at nothing.

What value should I give the fetch timeout so a slow Croct call can never hold the
page hostage, and is there anything else I should do so a timeout does not blank
the hero?

## 2 answers

### Answer from Leo Nakamura (2026-11-07)

The knob you want is `defaultFetchTimeout`. It is a plug option, default 5000ms
in plain JS (2000ms in the Next.js SDK), and you should set it explicitly to
whatever fits your loader budget rather than leave it at the default. If you are
protecting a ~60ms loader, something well under a second is reasonable.

The important half is the fallback. Always pass default content on the fetch, so
when the timeout trips or the call fails the loader still returns your default
hero instead of nothing:

```
const {content} = await fetchContent('home-hero', {
  fallback: defaultHero,
});
```

With that in place the timeout is just an upper bound on how long you wait before
rendering the default. The page always renders.

### Answer from Sam Okafor (2026-11-09)

Adding the Oxygen side of it since that is really your constraint. The worker has
a 128MB memory cap and does not let you spin up third-party server processes, so
keep the loader lean, one content fetch with a tight timeout and a fallback, not a
fan-out of calls.

For what it is worth the end-to-end response times run under 90ms at P95, so a
generous timeout is mostly there to catch the rare bad tail, not the normal case.
Set it low enough that the tail never blocks the response and let the fallback do
the rest.

#### Reply from mira_ships (2026-11-09)

that settles it. tight timeout plus a fallback hero, and I stop treating the
fetch as something that can hang the loader. thanks both
