Skip to content

Commit f1250f3

Browse files
committed
feat: increase maximum incoming message size from 1MB to 100MB
1 parent 8a6ee66 commit f1250f3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

wherobots/db/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
DEFAULT_RUNTIME = Runtime.SEDONA
1010
DEFAULT_REGION = Region.AWS_US_WEST_2
1111
DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS = 300
12+
MAX_MESSAGE_SIZE = 100 * 2**20 # 100MiB
1213

1314

1415
class ExecutionState(StrEnum):

wherobots/db/driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
DEFAULT_REGION,
1515
DEFAULT_RUNTIME,
1616
DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
17+
MAX_MESSAGE_SIZE,
1718
)
1819
from .errors import (
1920
InterfaceError,
@@ -116,7 +117,9 @@ def http_to_ws(uri: str) -> str:
116117
def connect_direct(uri: str, headers: dict[str, str] = None) -> Connection:
117118
logging.info("Connecting to SQL session at %s ...", uri)
118119
try:
119-
ws = websockets.sync.client.connect(uri=uri, additional_headers=headers)
120+
ws = websockets.sync.client.connect(
121+
uri=uri, additional_headers=headers, max_size=MAX_MESSAGE_SIZE
122+
)
120123
session = Connection(ws)
121124
return session
122125
except Exception as e:

0 commit comments

Comments
 (0)