This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 25b2083881 fix: raise default WebSocket payload limit to avoid 
dropping large result frames (#6858)
25b2083881 is described below

commit 25b208388100c49280eb6511f50c330db7b711aa
Author: ali risheh <[email protected]>
AuthorDate: Thu Aug 20 20:35:55 2026 +0000

    fix: raise default WebSocket payload limit to avoid dropping large result 
frames (#6858)
    
    ### What changes were proposed in this PR?
    
    Raises the default maximum workflow WebSocket message size from **64 KB
    to 1024 KB (1 MB)**, in every place the default is encoded:
    
    - `common/config/src/main/resources/application.conf` — the base config
    default (`web-server.max-workflow-websocket-request-payload-size-kb`)
    - `bin/k8s/values.yaml` — the Helm chart env default
    (`MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB`), which overrides the
    base default in Kubernetes deployments
    - `bin/k8s/values-development.yaml` — the same env var in the
    development chart, which otherwise kept reproducing #6857
    - `common/config/src/test/scala/.../ApplicationConfigSpec.scala` — the
    guard test asserting the default
    
    `WebsocketPayloadSizeTuner` applies this value to the Jetty WebSocket
    container's max text/binary message buffer. At the previous 64 KB
    default, the result/status frame pushed to the browser for a workflow
    with many operators or a sizable visualization payload (e.g. a Bar
    Chart) could exceed 65536 bytes; Jetty then drops the entire frame with
    `MessageTooLargeException`, so the final result/visualization never
    reaches the frontend even though the execution completes successfully on
    the backend. The overshoot is often only a couple KB, so even modest
    workflows can trip it. 1 MB gives ample headroom for large visualization
    payloads while remaining well within reasonable WebSocket frame sizes.
    
    This changes only a default value; the limit remains overridable via the
    `MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB` environment variable.
    
    ### Any related issues, documentation, discussions?
    
    Closes #6857
    
    ### How was this PR tested?
    
    Updated the existing guard test in `ApplicationConfigSpec`
    (`maxWorkflowWebsocketRequestPayloadSizeKb shouldBe 1024`), which covers
    the base config default.
    
    Manually verified the runtime behavior. Ran a workflow ending in a Bar
    Chart whose serialized result frame exceeded 64 KB:
    - **Before:** the visualization did not render, and the computing unit
    logged `MessageTooLargeException: ... too large for configured max of
    [65536]` at completion.
    - **After:** the frame is delivered and the chart renders.
    
    Also verified with `helm template` that the rendered chart env value
    updates to `1024` and that both charts still render cleanly.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 4.8
    
    ---------
    
    Signed-off-by: ali <[email protected]>
    Co-authored-by: Yicong Huang 
<[email protected]>
    Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
 .../org/apache/texera/web/resource/WebsocketPayloadSizeTuner.scala      | 2 +-
 bin/k8s/values-development.yaml                                         | 2 +-
 bin/k8s/values.yaml                                                     | 2 +-
 common/config/src/main/resources/application.conf                       | 2 +-
 .../scala/org/apache/texera/common/config/ApplicationConfigSpec.scala   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/amber/src/main/scala/org/apache/texera/web/resource/WebsocketPayloadSizeTuner.scala
 
b/amber/src/main/scala/org/apache/texera/web/resource/WebsocketPayloadSizeTuner.scala
index 92c7ad87f0..3fa032db5b 100644
--- 
a/amber/src/main/scala/org/apache/texera/web/resource/WebsocketPayloadSizeTuner.scala
+++ 
b/amber/src/main/scala/org/apache/texera/web/resource/WebsocketPayloadSizeTuner.scala
@@ -21,7 +21,7 @@ package org.apache.texera.web.resource
 import javax.servlet.{ServletContextEvent, ServletContextListener}
 import javax.websocket.server.ServerContainer
 
-class WebsocketPayloadSizeTuner(maxKB: Int) // by default, 64 KiB
+class WebsocketPayloadSizeTuner(maxKB: Int) // by default, 1 MiB
     extends ServletContextListener {
 
   override def contextInitialized(sce: ServletContextEvent): Unit = {
diff --git a/bin/k8s/values-development.yaml b/bin/k8s/values-development.yaml
index aa64d6ecbc..f2f885f105 100644
--- a/bin/k8s/values-development.yaml
+++ b/bin/k8s/values-development.yaml
@@ -307,7 +307,7 @@ texeraEnvVars:
   - name: SCHEDULE_GENERATOR_ENABLE_COST_BASED_SCHEDULE_GENERATOR
     value: "true"
   - name: MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB
-    value: "64"
+    value: "1024"
   - name: MAX_NUM_OF_RUNNING_COMPUTING_UNITS_PER_USER
     value: "10"
   - name: KUBERNETES_COMPUTING_UNIT_CPU_LIMIT_OPTIONS
diff --git a/bin/k8s/values.yaml b/bin/k8s/values.yaml
index 9c37d3b408..907c212cb6 100644
--- a/bin/k8s/values.yaml
+++ b/bin/k8s/values.yaml
@@ -310,7 +310,7 @@ texeraEnvVars:
   - name: SCHEDULE_GENERATOR_ENABLE_COST_BASED_SCHEDULE_GENERATOR
     value: "true"
   - name: MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB
-    value: "64"
+    value: "1024"
   - name: MAX_NUM_OF_RUNNING_COMPUTING_UNITS_PER_USER
     value: "10"
   - name: KUBERNETES_COMPUTING_UNIT_CPU_LIMIT_OPTIONS
diff --git a/common/config/src/main/resources/application.conf 
b/common/config/src/main/resources/application.conf
index c7a7af2418..d5f7ffed2e 100644
--- a/common/config/src/main/resources/application.conf
+++ b/common/config/src/main/resources/application.conf
@@ -90,7 +90,7 @@ web-server {
     clean-all-execution-results-on-server-start = false
     clean-all-execution-results-on-server-start = 
${?WEB_SERVER_CLEAN_ALL_EXECUTION_RESULTS_ON_SERVER_START}
 
-    max-workflow-websocket-request-payload-size-kb = 64
+    max-workflow-websocket-request-payload-size-kb = 1024
     max-workflow-websocket-request-payload-size-kb = 
${?MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB}
 }
 
diff --git 
a/common/config/src/test/scala/org/apache/texera/common/config/ApplicationConfigSpec.scala
 
b/common/config/src/test/scala/org/apache/texera/common/config/ApplicationConfigSpec.scala
index 8a16a8d48e..5c18bff3fa 100644
--- 
a/common/config/src/test/scala/org/apache/texera/common/config/ApplicationConfigSpec.scala
+++ 
b/common/config/src/test/scala/org/apache/texera/common/config/ApplicationConfigSpec.scala
@@ -131,7 +131,7 @@ class ApplicationConfigSpec extends AnyFlatSpec with 
Matchers {
       ApplicationConfig.cleanupAllExecutionResults shouldBe false
     )
     ifUnset("MAX_WORKFLOW_WEBSOCKET_REQUEST_PAYLOAD_SIZE_KB")(
-      ApplicationConfig.maxWorkflowWebsocketRequestPayloadSizeKb shouldBe 64
+      ApplicationConfig.maxWorkflowWebsocketRequestPayloadSizeKb shouldBe 1024
     )
   }
 

Reply via email to