|
I have self-hosted Langfuse version 3.126.1. When I restart both the web and worker pods of Langfuse, new traces stop appearing in the UI. Maybe someone has any idea how debug it? Code that I use to send traces, does not show any errors: Web pod shows that trace came without any erros: The worker pod shows no errors in the logs, but it also does not perform any background processing or write data to ClickHouse, unlike in the normal working state. |
Replies: 1 comment 2 replies
|
Based on your description, this appears to be a queue processing issue in your Langfuse v3 deployment. The web container is accepting traces (as shown in your logs), but the worker container isn't processing them from the Redis queue. Key Architecture PointsIn Langfuse v3, the system uses an asynchronous architecture where the web container accepts events and queues them in Redis, then the worker container processes these events and writes them to ClickHouse(1). When traces stop appearing after a restart but reappear after another restart, this typically indicates a queue or worker connection issue. Debugging Steps1. Check Redis Connection and Queue Status Verify that your worker pod can connect to Redis and that queues are being populated. The worker processes events from Redis queues named for ingestion(2). 2. Verify Worker Container Logs Since your worker shows no errors but also no processing activity, check for:
3. Check Environment Variables Ensure these critical variables are set correctly on both web and worker pods(3):
4. Verify Queue Configuration If you're using queue sharding, ensure 5. Check ClickHouse Connectivity Verify the worker can connect to ClickHouse. Connection issues might cause silent failures(3). Potential Root CausesBased on the v3 architecture, the most likely issues are:
Since a second restart resolves the issue, this suggests a race condition or initialization order problem rather than a configuration error. I recommend checking the worker pod's startup logs carefully for Redis and ClickHouse connection establishment messages, and verifying that all required environment variables are present and consistent across restarts. 📚 Sources: Have another question? Just tag @inkeep. |
The issue was caused by a misconfiguration of Redis on our side. It was deployed as a Sentinel setup, but the configuration didn’t specify that. As a result, during Langfuse startup, it connected to the wrong Redis node (not the master).