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

🐛 socket hang up error #300

Merged
merged 6 commits into from
Jun 12, 2024
Merged

🐛 socket hang up error #300

merged 6 commits into from
Jun 12, 2024

Conversation

twelch
Copy link
Contributor

@twelch twelch commented Jun 11, 2024

Fixes #299.

This PR resolves an issue with an ECONNRESET, socket hang up error. It seems to happen only when many requests are being made within a geoprocessing function.

Cause: Node 19+ sets keepalive to true for http/https connections by default, were previously it was set to false. This allows reuse of a connection by requests to the same domain using OS level sockets. Somehow, probably through misconfiguration of request timeouts and socket timeouts, a connection socket is being closed either during an open request, or a request is being attempted on an already closed connection.

@twelch twelch changed the title Bug socket hang up error 🐛 socket hang up error Jun 11, 2024
@twelch twelch merged commit 582c2d4 into dev Jun 12, 2024
2 checks passed
@twelch twelch deleted the bug-socket-hang-up branch June 12, 2024 16:01
twelch added a commit that referenced this pull request Jun 25, 2024
* strictly set keepalive false in http agent, fix console.time label name collision

* add infinity maxSockets

* drop global maxSockets

* pass options instead of init, use agent switcher depending on protocol

* comment

* make sure console time label consistent start and end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Socket hangup error
1 participant