Skip to content

Commit 425e7cb

Browse files
authored
Merge pull request #3023 from murgatroid99/grpc-js_session_memory_fix
grpc-js: Re-add a couple of accidentally removed HTTP/2 session settings
2 parents 3dd281b + dcb2182 commit 425e7cb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.14.0",
3+
"version": "1.14.1",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/transport.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,13 @@ export class Http2SubchannelConnector implements SubchannelConnector {
720720
initialWindowSize:
721721
options['grpc-node.flow_control_window'] ??
722722
http2.getDefaultSettings?.()?.initialWindowSize ?? 65535,
723-
}
723+
},
724+
maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER,
725+
/* By default, set a very large max session memory limit, to effectively
726+
* disable enforcement of the limit. Some testing indicates that Node's
727+
* behavior degrades badly when this limit is reached, so we solve that
728+
* by disabling the check entirely. */
729+
maxSessionMemory: options['grpc-node.max_session_memory'] ?? Number.MAX_SAFE_INTEGER
724730
};
725731
const session = http2.connect(`${scheme}://${targetPath}`, sessionOptions);
726732
// Prepare window size configuration for remoteSettings handler

0 commit comments

Comments
 (0)