How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

ECONNRESET error when downloading assets during dataset export

7 repliesLast updated: Nov 29, 2025

Hi, I'm running
sanity dataset export
but I'm constantly getting
ECONNRESET
when downloading assets today.
I have run that command successfully in the past.

Any ideas?


Exporting documents... (15285/15285)
Downloading assets... (1561/2913)Error: aborted
    at connResetException (node:internal/errors:705:14)
    at TLSSocket.socketCloseListener (node:_http_client:454:19)
    at TLSSocket.emit (node:events:525:35)
    at node:net:301:12
    at TCP.done (node:_tls_wrap:588:7) {
  code: 'ECONNRESET'
}
AI Update

I feel your pain – ECONNRESET errors during asset downloads are frustrating, especially when the export was working fine before! This is typically a network or connection issue when downloading assets from Sanity's CDN. Here are several solutions to try:

Quick Fix: Reduce Asset Concurrency

The most common solution is to reduce the number of concurrent asset downloads. The CLI has an --asset-concurrency flag for this:

sanity dataset export production --asset-concurrency 5

The default is 12 concurrent downloads, which can overwhelm your connection or hit rate limits. Try starting with 5 and adjust up or down based on what works for your network.

Other Solutions to Try

1. Export without assets first, then retry

# Export documents only (fast)
sanity dataset export production production-docs.ndjson --no-assets

# Then export with assets and lower concurrency
sanity dataset export production production-full.tar.gz --asset-concurrency 3

2. Check your Node.js version

ECONNRESET errors with TLS connections can sometimes be Node.js version-related. Make sure you're running a stable LTS version (Node 20+ is required for newer Sanity tooling). Try updating if you're on an older version:

node --version

3. Network/firewall issues

4. Retry during off-peak hours

If Sanity's CDN is experiencing high load, you might have better luck at different times of day.

5. Check Sanity's status

Visit status.sanity.io to see if there are any ongoing issues with asset delivery or the CDN.

If Nothing Works

For very large datasets, you might need to:

The --asset-concurrency flag is usually the magic fix though – start there!

Show original thread
7 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions