Skip to content

[Node] Gracefully handle connection errors in the outbound network proxy #2370

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

Merged

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jul 14, 2025

Motivation for the change, related issues

As discovered in Automattic/studio#1491, adding a timeout before closing the network connection in the outbound network proxy prevents freezing the PHP runtime when the target cannot be reached.

This PR adds such a timeout.

The exact reason behind this behavior isn't well understood yet. The freeze is not deterministic or easy to reproduce, which is why this PR does not ship any tests. We should keep an eye on this and, if it ever comes up again, invest some time in a proper deep dive to understand all the factors at play.

Related to Automattic/studio#1491

cc @gavande1 @mho22

@adamziel adamziel marked this pull request as ready for review July 22, 2025 11:43
@adamziel adamziel merged commit 7b1cfa8 into trunk Jul 22, 2025
24 of 25 checks passed
@adamziel adamziel deleted the networking-proxy-error-handling-concurrent-connections branch July 22, 2025 12:22
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.

1 participant