Socket hang up on build of Nextjs site

I’m having trouble getting a site (forensis) built. Each time I deploy, it fails with some intermittent “socket hang up” errors. This is all a new thing that started yesterday. It’s reading the data from a CMS, for which nothing’s changed.

I guess my questions are:

  • Is there a known issue with network connectivity at the moment?
  • Can you see any more details in your logs as to the cause?
  • Anything you can suggest to look for on this end? It’s completely random as far as I can tell. I.e., each time I run the deploy, different pages crap out, but as a result, the whole 8000+ page build fails. Nothing on the CMS end seems amiss.
12:03:08 PM: Error occurred prerendering page "/forensis-expert-witness/business/freight-forwarding-trucking-expert-witness". Read more:
12:03:08 PM: FetchError: request to failed, reason: socket hang up
12:03:08 PM:     at ClientRequest.<anonymous> (/opt/build/repo/node_modules/next/node_modules/node-fetch/lib/index.js:1461:11)
12:03:08 PM:     at ClientRequest.emit (node:events:513:28)
12:03:08 PM:     at TLSSocket.socketOnEnd (node:_http_client:518:9)
12:03:08 PM:     at TLSSocket.emit (node:events:525:35)
12:03:08 PM:     at endReadableNT (node:internal/streams/readable:1358:12)
12:03:08 PM:     at processTicksAndRejections (node:internal/process/task_queues:83:21)


FWIW, I’ve upsized the EC2 instance that the CMS is running on, pulled the database off that machine and put it into an RDS instance, and set all the dynamic paths to fallback=true. Made zero difference. Seems to be something happening on the Netlify end from all indications.

OK, well, for posterity… it would seem that this is related to SSL somehow. For lack of other options, I poked a hole in the reverse proxy in front of the CMS to allow it to be accessed over straight HTTP, and it built without a hitch.

So, I suspect there’s something busted at Netlify in dealing with SSL connections, since I’ve got no issues anywhere else with the same setup.

Hey @crustyratfink,

Taking a look at your latest failed deploys, they seem to indicate a different error - which you seem to have resolved. Are you still seeing the above mentioned issue?

Hi, sorry, missed your response.

I’m no longer seeing that error. I don’t know what other error you noticed, but this particular issue was definitely the SSL thing. Wasn’t able to trace it down to the actual THING about SSL, but with it enabled, the site wouldn’t build. Without it, it does. To be honest, getting it done and moving on was better than knowing the whys of it, since I’m not terribly concerned about some site content being encrypted on build.

Hi @crustyratfink :wave:t6: ,

Thanks so much for reaching back out and letting us know you got the problem resolved.