fix(proxy): configure proxy agent connection limits and IPv4 support#2303
Merged
fallenbagel merged 3 commits intodevelopfrom Jan 20, 2026
Merged
Conversation
…leaks Add socket pool configuration to HttpProxyAgent and HttpsProxyAgent to prevent connection leaks. fix #2297
39cb412 to
f46773e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gauthier-th
reviewed
Jan 16, 2026
gauthier-th
approved these changes
Jan 17, 2026
Member
gauthier-th
left a comment
There was a problem hiding this comment.
LGTM. We should probably create a preview tag to test this before merging?
Collaborator
Author
Preview deployed |
Member
|
Fix confirmed working. |
0xSysR3ll
approved these changes
Jan 20, 2026
0xSysR3ll
pushed a commit
to 0xSysR3ll/jellyseerr
that referenced
this pull request
Jan 20, 2026
…eerr-team#2303) * fix: configure axios proxy agent socket limits to prevent connection leaks Add socket pool configuration to HttpProxyAgent and HttpsProxyAgent to prevent connection leaks. fix seerr-team#2297 * fix(proxy): pass forceIpv4First option to custom proxy agent * fix(proxy): add connection limits and IPv4 support to undici agents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Configures axios and undici proxy agents with connection pool limits and idle timeouts to prevent connection accumulation. The undici agents already had
keepAliveTimeout: 5000configured, but we're missing connection limits and axios was using Node's default agent with unlimited sockets and no idle timeout. This caused connections to accumulate over time.This PR adds
maxSocketsandmaxFreeSocketsto bound the connection pool, a matching 5 second idletimeout, and LIFO scheduling to naturally cycle out older connections.connectionslimit of 50 were also added to undici agents (defaultAgent and ProxyAgent). In addition, it also passes theforceIpv4Firstsetting to the proxy agent which previously overwrote that option, breaking the IPV4-first resolution when both proxy and `forceIpv4First were enabled.How Has This Been Tested?
(no need tbh).
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extract