Request timeout
Find out the solution for request timeout errors.
If you see an error message like the one below in your console, your request to retrieve content or evaluate a query has exceeded the timeout specified.
The request timed out.
On the client side, this can be due to a slow internet connection, distant servers, or DNS issues. On the server side, it is often due to the distance between your server and our API.
While our APIs are optimized for low latency, network conditions between your request and our response are beyond our control. To help diagnose these issues, we provide the following response headers:
- X-Croct-Timing
The total time it took to process the request in milliseconds. - X-Croct-Region
The geographic region in which the request was processed.
The easiest way to access this information is to enable debug mode. Once enabled, check the browser's console or your server's logs for messages like the following:
Content for slot "<slot-id>" processed by region us-central1 in 61.824872msEvaluation of query "<query>" processed by region us-central1 in 68.552311ms
If the total time you observe is relatively higher than the processing time, the delay is likely occurring between the client (for client-side requests) or the server (for server-side requests) and our API.