Socket hang up after server requests came through
See original GitHub issueAfter I had managed to get an lhci server working on a k8s cluster I wanted to host it on my own server. There is no docker container on this server, just the lhci server node process running. After the lhci autorun is complete, I can see the GET and POST requests coming in and it shows the hashes of previous commits on the lhci server dashboard, however the fetch request fails with the following error at the client
FetchError: request to {lhciserver.com}/v1/projects/{token}/builds/{buildHasH}/lifecycle failed, reason: socket hang up
at ClientRequest.<anonymous> (.../node_modules/@lhci/cli/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:193:13)
at TLSSocket.socketOnEnd (_http_client.js:431:9)
at TLSSocket.emit (events.js:198:15)
at endReadableNT (_stream_readable.js:1139:12)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
Any idea what might cause this error? When looking it up, it seems to have something to do with a request that takes too long after which the socket is not kept alive
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
NodeJS - What does "socket hang up" actually mean?
When you, as a client, send a request to a remote server, and receive no timely response. Your socket is ended which throws...
Read more >Could not get any response socket hang up - Help - Postman
I am not able to Post to the server. I am receiving “Could not get any response” error. While checking the logs found...
Read more >502 Bad Gateway - Socket hang up | Apigee Edge
The error code [socket hang up][ECONNRESET] indicates that the target server has closed the connection with Edge Microgateway.
Read more >How to handle a socket hang up error in Node.js usually - Quora
Socket hang up error are usually errors when requests coming to your server are more than it can handle. This might be b...
Read more >Hang in There! (A solution to socket hang up) - Medium
This blog post will go over my process of solving the error and what the actual (and surprisingly/annoyingly) simple solution was. First thing ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, yeah if you have other stuff running on the machine pushing memory limits that might be your issue. You can also try increasing the heap size of node when you launch the server if you actually have enough space but it doesn’t seem to be taking advantage of it (
node --max-old-space-size=4096 server.js
).LHCI server logs should tell us more if you keep running into issues though 😃
@aaraar what are the specs of the server you’re running and how many runs are you uploading per build?
The logic on the server is rather simplistic at the moment where it reads all the LHRs into memory for a build to pick the “representative” one when it updates the lifecycle to
sealed
(the route that appears to be failing). If you don’t have enough resources to do that, the server will likely crash and lead to a socket hang up error.