Support Forums

Netlify deploy inconsistent errors

Hi guys,

I’m facing errors on deployments when generating ma pages. Sometimes it works, sometime not :

7:35:38 PM: [error] request to https://graphql.xxxxx.com/environments/staging failed, reason: Client network socket disconnected before secure TLS connection was established
7:35:38 PM:   at ClientRequest.<anonymous> (node_modules/cross-fetch/node_modules/node-fetch/lib/index.js:1461:11)
7:35:38 PM:   at ClientRequest.emit (node:events:390:28)
7:35:38 PM:   at TLSSocket.socketErrorListener (node:_http_client:447:9)
7:35:38 PM:   at TLSSocket.emit (node:events:390:28)
7:35:38 PM:   at emitErrorNT (node:internal/streams/destroy:157:8)
7:35:38 PM:   at emitErrorCloseNT (node:internal/streams/destroy:122:3)
7:35:38 PM:   at processTicksAndRejections (node:internal/process/task_queues:83:21)

I would like to know if it’s something relates to Netlify or to my API ?

Thanks for your help !

Best regards

Hi @kiS

I would lean toward the server/API endpoint taking too long to respond. Check out the following thread for some possibly helpful insights.

1 Like

Thanks @coelmay , that’s what I was expecting and thinking.
We will have a look on the API and the queries if there is something on this side.

I’ll then send an answer and hopefully share a solution.

Best !

Hi there,

After digging a little bit, the issue was related to the way that Nuxt is fetching our API.
Actually, according to the Nuxt documention, when static website is generated (https://nuxtjs.org/docs/configuration-glossary/configuration-generate/#concurrency), 500 concurrent requests are made to the API, which was too much.
Moving to 100 concurrent requests solved the issue without increasing build time.

Thanks for your help.

Best regards.