Temporal SDK gRPC calls fail with DEADLINE_EXCEEDED after node restart (GraalVM / K8s)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- grpc, java, kubernetes, spring-boot
调研方向
从链接的 temporal-graalvm-k8s demo、其 Helm 安装以及启动时的 listNamespaces 调用开始。通过排空或重启一个 Kubernetes 节点来复现故障,然后使用报告的 DEADLINE_EXCEEDED 日志,将 native-image 的行为与 JVM 运行和非 Kubernetes 运行进行比较。当 Temporal 集群运行正常时,应用能够重新连接并且 listNamespaces 迅速成功,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When a Spring Boot application using the Temporal Java SDK is compiled as a GraalVM native image and deployed in Kubernetes, the application fails to communicate with Temporal after node restarts or pod rescheduling.
The same application works correctly:
- ✅ On JVM (non-native)
- ✅ In Docker outside Kubernetes
- ❌ Fails in Kubernetes when running as GraalVM native image
This suggests a compatibility issue between Temporal Java SDK and GraalVM native runtime, potentially related to:
- gRPC channel lifecycle
- DNS resolution / service discovery
- resource or reflection configuration
- connection reuse after pod rescheduling
Steps to Reproduce
- Install Temporal using official Helm chart - https://github.com/temporalio/helm-charts
- Deploy demo application - https://github.com/olegdibrov/temporal-graalvm-k8s
Install the app:
helm install control {path/to/chart}
Application logic (executed on startup):
List<DescribeNamespaceResponse> namespaces = workflowClient
.getWorkflowServiceStubs()
.blockingStub()
.listNamespaces(ListNamespacesRequest.newBuilder().build())
.getNamespacesList();
log.info("Found {} namespaces", namespaces.size());
- Restart Kubernetes node OR drain node:
kubectl drain <node> --ignore-daemonsets
Observe application startup behavior
Actual Behavior
Application fails to start for 10–30 minutes
Repeated errors:
io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: Deadline CallOptions was exceeded after 9.999s
Temporal cluster is healthy (all pods ready)
Eventually, the application may recover without restart
Expected Behavior
- Application should reconnect to Temporal immediately after pod restart
- listNamespaces should succeed consistently
- No prolonged unavailability if Temporal cluster is healthy
Important Observations
- Issue only occurs in GraalVM native image
- Does NOT reproduce on JVM
- Does NOT reproduce outside Kubernetes
- Temporal services are reachable and healthy during failure window
Delay (~10–30 minutes) suggests:
- stale DNS cache
- broken gRPC channel reuse
- or native-image-related networking issue
Environment
- Temporal SDK: 1.33.0
- GraalVM: 25
- Java: 25
- Spring Boot: 3.5.13
- Kubernetes: v1.30.5
Logs
Example error:
io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: Deadline CallOptions was exceeded after 9.999786125s
- 主要语言
- Java
- 星标
- 434
- 派生
- 260
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
temporalio/sdk-java#3134 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
temporalio/sdk-java#1825 ·
维护者通常 1 天内回复
-
Proposal: handle SIGTERM by default to initiate graceful worker shutdown可能已有人在做 @eamsden 于 3 天前认领。 未关闭
temporalio/sdk-java#3135 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 54/100
temporalio/sdk-java#3125 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 55/100
temporalio/sdk-java#3124 ·
维护者通常 1 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
ShaftHQ/SHAFT_ENGINE#6909 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
mudler/parakeet.cpp#99 ·
维护者通常 1 天内回复
-
[BUG] Re-subscribing the Mono returned by listTools/listResources/listResourceTemplates/listPrompts/listRoots duplicates the results可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/java-sdk#1174 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
baomidou/mybatis-plus#7185 ·
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
refinedmods/refinedstorage2#1419 ·