How to identify what's consuming excessive bandwidth in Sanity?

12 replies
Last updated: Jan 28, 2026
Looking for the best way to see what is chewing through the bandwidth on one of our website.This seems insane for a marketing site.
AI Update

Based on your concern about bandwidth usage on your marketing site, Sanity has a built-in feature called Request Logs that's perfect for diagnosing exactly what's consuming your bandwidth.

How to Access Request Logs

  1. Go to your project settings at sanity.io/manage
  2. Navigate to the Usage section
  3. Scroll to the bottom where you can download up to 1GB of log data from the last 7 days
  4. You can request a new export every 24 hours

What You'll See

The logs come as gzipped NDJSON files with detailed information about every request, including:

  • Request Type (API, APICDN, or CDN) - helps identify if it's content queries or asset downloads
  • Full URL with query parameters
  • GROQ Query Identifier - groups similar queries together so you can spot repeated patterns
  • Remote IP - identify if traffic is coming from bots or specific sources
  • User Agent and Referrer - understand what's making the requests
  • Timestamp - spot usage spikes
  • Bandwidth usage per request

Analyzing the Data

You can convert the logs to CSV for easier analysis:

gunzip --stdout logfile.ndjson.gz | npx json2csv --ndjson --output output.csv

Then open in Excel/Google Sheets, or use tools like jq, GROQ CLI, or even upload samples to ChatGPT for analysis help.

Common Culprits for High Bandwidth

Based on common issues others have found:

  • Missing dependencies in useEffect hooks causing infinite request loops
  • Bot traffic hitting your site repeatedly
  • Inefficient queries fetching too much data
  • Large images being delivered without optimization
  • CDN not being used when it should be (check if requests show as "API" instead of "APICDN")

Pro tip: Filter out studioRequest entries - those are from your Sanity Studio and don't count toward your bandwidth costs.

The Request Logs should give you a clear picture of what's driving your bandwidth usage so you can optimize accordingly!

Show original thread
12 replies

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.

Was this answer helpful?