Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection for page-data fetch requests in query o demand gets closed sometimes #28184

Closed
pieh opened this issue Nov 19, 2020 · 0 comments
Closed
Assignees
Labels
topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) type: bug An issue or pull request relating to a bug in Gatsby

Comments

@pieh
Copy link
Contributor

pieh commented Nov 19, 2020

Occasionally some requests seem to get a lot of added latency and the socket gets closed:

Screenshot 2020-11-19 at 14 35 27
Screenshot 2020-11-19 at 14 35 58

This needs more investigation, but initial running theory is that query running takes longer than 5 seconds which is default timeout of Node.js server before it close the socket connection ( https://nodejs.org/docs/latest-v8.x/api/http.html#http_server_keepalivetimeout ) - note that this doesn't break the fetch request per se - it does fallback to different methods and will eventually deliver response (this is lower level than http requests themselves), but this seems to add quite a noticeable latency on top of query running alone.

We can either bump keepAliveTimeout globally for express server or target just the page-data express handler ( expressjs/express#3556 ). But due to https://docs.pushtechnology.com/cloud/latest/manual/html/designguide/solution/support/connection_limitations.html it might not be as straight forward and cause different issues.

@pieh pieh added type: bug An issue or pull request relating to a bug in Gatsby topic: query on demand* labels Nov 19, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 19, 2020
@pieh pieh changed the title connection for page-data fetch requests gets closed connection for page-data fetch requests in query o demand gets closed sometimes Nov 19, 2020
@pieh pieh removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 19, 2020
@pieh pieh self-assigned this Nov 20, 2020
@LekoArts LekoArts added topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) and removed topic: query on demand* labels May 28, 2021
@pieh pieh closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants