Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Support changing gRPC max message length (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmeapples authored May 11, 2021
1 parent 4022469 commit 8c457c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"runtimeArgs": ["run-script", "dev"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"type": "pwa-node"
"type": "pwa-node",
"env": {
"TEMPORAL_GRPC_MAX_MESSAGE_LENGTH": "6194304"
}
},
{
"name": "Debug with mTLS",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Set these environment variables if you need to change their defaults
| TEMPORAL_HOT_RELOAD_TEST_PORT | HTTP port used by hot reloading in tests | 8082 |
| TEMPORAL_SESSION_SECRET | Secret used to hash the session with HMAC | "ensure secret in production" |
| TEMPORAL_EXTERNAL_SCRIPTS | Additional JavaScript tags to serve in the UI | |
| TEMPORAL_GRPC_MAX_MESSAGE_LENGTH | gRPC max message length (bytes) | 4194304 (4mb) |

<details>
<summary>
Expand Down
3 changes: 3 additions & 0 deletions server/temporal-client/temporal-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function TemporalClient() {

const { credentials: tlsCreds, options: tlsOpts } = getCredentials();

tlsOpts['grpc.max_receive_message_length'] =
Number(process.env.TEMPORAL_GRPC_MAX_MESSAGE_LENGTH) || 4 * 1024 * 1024;

let client = new service.temporal.api.workflowservice.v1.WorkflowService(
process.env.TEMPORAL_GRPC_ENDPOINT || '127.0.0.1:7233',
tlsCreds,
Expand Down

0 comments on commit 8c457c6

Please sign in to comment.