From 1cd271a03e68245470f562560d28359c9a6a5d07 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sat, 11 Apr 2020 21:44:14 -0700 Subject: [PATCH] Set a timeout of 15 seconds on queries Query resolvers can hang indefinitely right now which can be confusing to debug as there's no indication of what's happening. With a timeout set, eventually the hanging query will fail with an error like this which should help people figure out where to investigate --- packages/gatsby/src/query/queue.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby/src/query/queue.js b/packages/gatsby/src/query/queue.js index c690f5645bfc2..e0bdd64d93aae 100644 --- a/packages/gatsby/src/query/queue.js +++ b/packages/gatsby/src/query/queue.js @@ -10,6 +10,7 @@ const createBaseOptions = () => { concurrent: Number(process.env.GATSBY_EXPERIMENTAL_QUERY_CONCURRENCY) || 4, // eslint-disable-next-line new-cap store: FastMemoryStore(), + maxTimeout: 15000, } }