Skip to content

Commit

Permalink
Add documentation for gRPC message and memory limits delphix#390
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffngo committed Sep 9, 2021
1 parent 82dd1a3 commit 82e2654
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions docs/docs/Best_Practices/Memory_and_Message_Limits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Metadata and Message Limits
Operations that exceed their allowed metadata and/or message limits are terminated.

### Maximum size for metadata
The maximum size for metadata is 32 megabytes (`32MB`).

The sum of bytes used for the `message`, `action`, and `output` fields within [User Visible Errors](/Best_Practices/User_Visible_Errors.md) count towards total size of metadata.

### How to tell if the maximum metadata size was exceeded
When an operation should fail with a `UserError`, but fails with a `RpcError` instead.

### Maximum size for messages
The maximum size for messages is 128 kibibytes (`128 KiB`).

The following count towards the message size:
1. [Platform library](/References/Platform_Libraries.md) arguments
- Any arguments passed into a platform library will be included in the total message size.
2. [Logging](/References/Logging.md)
- The message provided to the logging function will be included in the total message size.

### How to tell if the maximum message size was exceeded
When a platform library or log callback fails with a `RpcError`.
6 changes: 3 additions & 3 deletions docs/docs/References/Platform_Libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Argument | Type | Description
-------- | ---- | -----------
remote_connection | [RemoteConnection](Classes.md#remoteconnection) | Connection associated with the remote host to run the command on.
command | String | Command to run on the host.
variables | dict[String, String] | **Optional**. Environement variables to set when running the command.
variables | dict[String, String] | **Optional**. Environment variables to set when running the command.
use_login_shell | boolean | **Optional**. Whether to use a login shell.
check | boolean | **Optional**. Whether or not to raise an exception if the `exit_code` in the `RunBashResponse` is non-zero.

Expand Down Expand Up @@ -85,7 +85,7 @@ Argument | Type | Description
-------- | ---- | -----------
remote_connection | [RemoteConnection](Classes.md#remoteconnection) | Connection associated with the remote host to run the command on.
command | String | Expect(Tcl) command to run.
variables | dict[String, String] | **Optional**. Environement variables to set when running the command.
variables | dict[String, String] | **Optional**. Environment variables to set when running the command.

### Returns
An object of `RunExpectResponse`
Expand Down Expand Up @@ -127,7 +127,7 @@ Argument | Type | Description
-------- | ---- | -----------
remote_connection | [RemoteConnection](Classes.md#remoteconnection) | Connection associated with the remote host to run the command on.
command | String | Command to run to the remote host.
variables | dict[String, String] | **Optional**. Environement variables to set when running the command.
variables | dict[String, String] | **Optional**. Environment variables to set when running the command.
check | boolean | **Optional**. Whether or not to raise an exception if the `exit_code` in the `RunPowershellResponse` is non-zero.

### Returns
Expand Down

0 comments on commit 82e2654

Please sign in to comment.