Skip to content

Commit 63e71e8

Browse files
authored
feat(coordinator): Add config coordinator.max_content_length (#4473)
Add a config item to control the maximum content length that coordinator's http server could handle. By default it is set to 1GB.
1 parent 04ebffa commit 63e71e8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

coordinator/gscoordinator/coordinator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def start_http_service(config):
130130
initialize_client_wrapper(config)
131131
app = connexion.App(__name__, specification_dir="./flex/openapi/")
132132
app.app.json_encoder = JSONEncoder
133+
app.app.config["MAX_CONTENT_LENGTH"] = config.coordinator.max_content_length
133134
app.add_api(
134135
"openapi.yaml",
135136
arguments={"title": "GraphScope FLEX HTTP SERVICE API"},

python/graphscope/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ class CoordinatorConfig:
263263
# It would try to find existing resources and connect to it.
264264
operator_mode: bool = False
265265

266+
# For http server, limit the max content length of request. Mainly for file upload.
267+
max_content_length: int = 1024 * 1024 * 1024 # 1GB
268+
266269

267270
@dataclass
268271
class HostsLauncherConfig:

0 commit comments

Comments
 (0)