Skip to content

Commit 1112ba5

Browse files
committed
Set keepAlive to false and add comment to true it in v7
1 parent c1f5fa6 commit 1112ba5

File tree

1 file changed

+2
-1
lines changed
  • packages/node/src/transports

1 file changed

+2
-1
lines changed

packages/node/src/transports/new.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export function makeNodeTransport(options: NodeTransportOptions): NewTransport {
4848

4949
const agent = proxy
5050
? (new (require('https-proxy-agent'))(proxy) as http.Agent)
51-
: new nativeHttpModule.Agent({ keepAlive: true, maxSockets: 30, timeout: 2000 });
51+
: // TODO(v7): Set keepAlive to true. Older versions of node had memory leaks when using it: #2555
52+
new nativeHttpModule.Agent({ keepAlive: false, maxSockets: 30, timeout: 2000 });
5253

5354
const requestExecutor = createRequestExecutor(options, options.httpModule ?? nativeHttpModule, agent);
5455
return createTransport({ bufferSize: options.bufferSize }, requestExecutor);

0 commit comments

Comments
 (0)