Slow Sanity response times (4-5s vs <100ms) - any known issues?

17 replies
Last updated: May 24, 2023
đź‘‹ We have been experiencing slow response times from sanity since yesterday. 4-5 seconds compared to &lt;100ms we are used to. Are there any known issues that could be causing this?
AI Update

I totally understand how frustrating that must be! Going from <100ms to 4-5 seconds is a huge jump. Here are some things to check:

First, check the status page:

Sanity maintains a status page at status.sanity.io where they report any ongoing incidents or degraded performance. This should be your first stop to see if there's a platform-wide issue affecting response times on apicdn.sanity.io or other services.

Common causes for sudden slowdowns:

  1. CDN vs non-CDN requests - Make sure you're using useCdn: true in your Sanity client configuration for read operations. The CDN endpoint (apicdn.sanity.io) is much faster than the direct API endpoint for queries, with intelligent caching at the edge. If something changed in your config, this could explain the slowdown.

  2. Query changes - Did you recently deploy any changes to your GROQ queries? Even small modifications can impact performance, especially with larger datasets. Check for:

    • New deep reference resolution (multiple levels of ->)
    • Added sorting operations on non-indexed fields
    • Increased result set sizes without pagination
  3. Dataset growth - If your content has grown significantly, queries that were fast before might now be hitting performance limits. The query optimization documentation covers techniques like efficient filtering, limiting projections to only the fields you need, and reducing deep nested queries.

  4. Authentication tokens - If you recently switched from using CDN-cached queries to authenticated queries (with tokens), you'll bypass the CDN cache and hit the API directly, which is slower but provides fresher data.

What to do next:

  • Check status.sanity.io for any reported incidents from yesterday
  • Review your Sanity client configuration (especially useCdn setting)
  • Check your query logs to see which specific queries are slow
  • Look at your recent deployments to see if any code changes coincide with when the slowdown started
  • If it's not a known issue and you can't identify the cause, contact Sanity support with specific examples of slow queries, your project ID, and timestamps of when the slowdown began - they can investigate API-level issues

The fact that this started "yesterday" suggests it might be either a platform issue (check the status page first) or a recent deployment on your end. If you haven't changed anything, definitely reach out to support with your project details so they can investigate!

Show original thread
17 replies
Not that I’m aware of! Can you share some of the queries that are giving you slow responses?
Hi RD, same here with a Nuxt.js 3 project. All the meta in our projects are in Sanity, and we saw that its the MetaQuery that is adding time. Up to 2-3 seconds. We can solve this by adding the meta in the code and leave the Meta in Sanity for blogs, but its still a slow response before loading the page for the blogs. We are currently on V2. We need your help to reduce the response time. THX.
Hey Kevin, can you send me your project ID?
Sure !ID : qizfvns5
Many thanks!
Hi RD, do you have any leads so far on the issue ?
Missed this post, but similar issues on my end. Starting around Mar 6/7, and getting intermittent latency on builds
Linking this response here.
Our SREs implemented a fix this morning. You shouldn’t have any more issues with latency. Thanks for your patience while we worked through this and please let us know if you continue to experience issues!
Many thx
user M
should I give the project ID of another project it seems a bit slow as well. ? ID: r53f4v4e
Also I saw the difference for the others thx !
user M
thanks so much, do you all have an incident report or description of issue that i can pass along to my team?
user S
Are you back to below 100ms ? I'm at 200 to 400.
user T
For the most part, yes.
user M
We never get below 100. We're at 200 to 400. Is there another fix for that? We are currently on a free account. Do we need to switch to a paid plan?
I'm seeing this behavior again this morning for the first time since mentioned this issue. Anyone else experiencing this?
Not sure if this is related but studio response is very slow or not responsive at all. We upped today to version 3.11.2 but when we had this happen we rolled back to 3.11.1 it did not resolve the issue though. I am having our team just refresh to close the windows which is working but it's not ideal.

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?