Skip to content

Commit

Permalink
fix(gatsby): Set a timeout of 15 seconds on queries (#23036)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
KyleAMathews authored Apr 12, 2020
1 parent 94267be commit 1e81c76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gatsby/src/query/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit 1e81c76

Please sign in to comment.