Thanks for the update! Since increasing the client timeout to 300s didn’t resolve the issue, this points to an infrastructure-level timeout problem rather than a client configuration issue.
Root Cause: Infrastructure Timeout
The error message “request timed out between gateway and broker” combined with your client timeout not helping suggests you have a reverse proxy or load balancer (like Nginx, HAProxy, or cloud load balancer) between your application and the Zeebe gateway that has its own timeout settings.
Key Questions
- Are you using Camunda SaaS or Self-Managed?
- Do you have any reverse proxy/load balancer in front of Zeebe? (Nginx, HAProxy, cloud load balancer, etc.)
- What’s your deployment setup? (Kubernetes, Docker, cloud provider)
Most Likely Solutions
If Using Nginx or Similar Proxy
You need to configure the proxy timeout to be higher than your client timeout:
location / {
grpc_pass grpc://zeebe-gateway:26500;
grpc_send_timeout 400s; # Higher than your 300s client timeout
grpc_read_timeout 400s;
}
If Using Cloud Load Balancer
- AWS ALB: Check target group settings for timeout
- GCP Load Balancer: Check backend service timeout
- Azure Load Balancer: Check probe and timeout settings
If Using Kubernetes Ingress
Check your ingress controller timeout settings:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/grpc-backend: "true"
nginx.ingress.kubernetes.io/proxy-send-timeout: "400"
nginx.ingress.kubernetes.io/proxy-read-timeout: "400"
Debugging Steps
1. Test Direct Connection
Try connecting directly to the Zeebe gateway (bypassing any proxy) to confirm if the issue is infrastructure-related:
// Temporarily test with direct connection
ZeebeClient client = ZeebeClient.newClientBuilder()
.gatewayAddress("your-zeebe-gateway:26500") // Direct connection
.usePlaintext()
.build();
2. Check Your Process Duration
Since the instance is created but .withResult() times out, your process might be taking longer than expected. Can you check:
- Does your process have user tasks that need manual completion?
- Are there timer events or external service calls?
- How long does the process actually take to complete in Operate?
3. Monitor Infrastructure Logs
Check logs from your proxy/load balancer for timeout-related messages around the time of the error.
Alternative Approach
If you can’t immediately fix the infrastructure timeouts, consider this pattern:
// Start process asynchronously
ProcessInstanceEvent processInstance = camundaClient
.newCreateInstanceCommand()
.bpmnProcessId(request.getBpmnProcessId())
.latestVersion()
.variables(request.getVariablesMap())
.send()
.join();
// Poll for completion or use webhooks/listeners
long processInstanceKey = processInstance.getProcessInstanceKey();
// Implement polling logic or use process instance listeners
Next Steps
Please share:
- Your deployment architecture (SaaS/Self-Managed, proxy setup)
- How long your process typically takes to complete
- Any proxy/load balancer configurations you have
This will help me provide more specific guidance!
References: