bug: Read timeout exporting span batches to self-hosted Langfuse
Describe the bug
Spans intermittently fail to reach our self-hosted Langfuse instance. The SDK logs:
Failed to export span batch code: None, reason: HTTPConnectionPool(host='10.0.0.9', port=3000): Read timed out. (read timeout=29.999983072280884)The affected traces never show up in the UI. The timeout is already raised to 30s and it still happens.
I expected the span batch to be delivered, or at least retried, rather than silently lost.
Steps to reproduce
Self-hosted Langfuse v4 on GKE, reached from the app over an internal load balancer at
http://10.0.0.9:3000.Initialize the SDK:
from langfuse import Langfuse
client = Langfuse(
public_key=...,
secret_key=...,
host="http://10.0.0.9:3000",
timeout=30,
flush_at=64,
)Instrument a LangChain/LangGraph app via
langfuse.langchain.CallbackHandler, attached as acallbacksentry on each graph invocation. Spans carry full prompts and model responses, so batches are large.Run normal traffic. The error above appears and those traces are missing from the UI.
Langfuse Cloud or self-hosted?
Self-hosted
If self-hosted, what version are you running?
v4.24 (langfuse-k8s Helm chart 1.5.41, image tag 4.24), GKE, ClickHouse managed separately by the ClickHouse operator
SDK and integration versions
| Package | Version |
|---|---|
langfuse |
4.15.0 |
opentelemetry-sdk |
1.42.1 |
opentelemetry-exporter-otlp-proto-http |
1.42.1 |
langchain-core |
1.4.0 |
langgraph |
1.2.4 |
langchain-google-genai |
4.2.1 |
| Python | 3.13 |
Integration: langfuse.langchain.CallbackHandler.
Deployment: GCP Cloud Run → private GKE Langfuse over an internal load balancer, plain HTTP.
Additional information
While debugging: the log says code: None and no Transient error ... retrying line ever appears, which suggests the batch is dropped on the first timeout rather than retried.
This log is often appeard in my system.
Are you interested in contributing a fix for this bug?
No
Source: langfuse/langfuse