Skip to main content

What happens to your app when the LLM tracing server goes down: 5 SDKs tested

Published · 15 min read
LLM-ops platform

When the tracing server goes down: Opik and AcruxCore keep traces, Langfuse and MLflow lose them, Phoenix's default blocks the app

A self-hosted tracing server will go down at some point: a deploy, a restart, a full disk. We wanted to know what that does to the app that sends it traces. So we ran one app that makes 20 traced LLM calls a second, stopped its tracing server for five minutes, then made every answer from the server five seconds late.

With each tool's Python SDK at its default settings, Opik and AcruxCore lost no traces. MLflow lost 88% of the traces reported during the outage and Langfuse 97%. Those four SDKs added at most 5 ms to the app's p99 latency (the time 99% of requests finish within) while the server was down. Phoenix, set up the default way, makes each request wait while its trace data is sent. So the app itself stopped answering: it turned away 95% of the requests that arrived during the outage.

We build AcruxCore, one of the five tools. We tested every tool twice, with the same app, the same phases and the same machine. The harness and every raw reading are on GitHub.

The results at a glance​

Tool and SDKTraces lost while downTraces lost while slowApp p99 latency added: healthy / down / slowApp memory, peak
Opik (opik 2.2.143)0 of 6,3750 of 5,625+14 / +5 / +52 ms175 MiB
AcruxCore (acruxcore 0.24.0)0 of 6,2320 of 5,768+1 / +1 / +1 ms47 MiB
MLflow (mlflow-tracing 3.18.0)5,510 of 6,244 (88%)5,051 of 5,756 (88%)+1 / +1 / +1 ms85 MiB
Langfuse (langfuse 5.2.0)6,100 of 6,284 (97%)0 of 5,716+0 / +0 / +1 ms75 MiB
Phoenix (arize-phoenix-otel 0.17.3)The app turned away 5,867 of 6,168 requests (95%)The app turned away all 5,832 requests+11 ms / about 10 minutes / no request served68 MiB

How to read this table:

  • Traces lost while down counts the traces the app reported while the server was down, and how many of them never reached the server's database. The outage was 5 minutes plus however long the tool took to restart (7 to 19 s), so each tool has a slightly different total.
  • Traces lost while slow is the same count for the phase when every answer from the server arrived 5 s late. That phase started once the server was back up, so it was shorter than 5 minutes by the restart time.
  • Phoenix has no trace counts in these two columns, because its app turned away most requests, and a request turned away makes no trace. Its cells count those requests instead.
  • App p99 latency added is the app's own request time at the 99th percentile in each phase, minus the same app with no tracing (103.2 ms). It is what tracing cost the app's request, not how long the trace took to send. For Phoenix while the server was down, the requests it accepted took about 10 minutes, and while the server was slow it accepted none.
  • App memory, peak is the app process's resident memory at its highest during the run. The same app with no tracing peaked at 33 and 41 MiB in its two runs.
  • The two "Traces lost" columns are what you lose, and the latency and memory columns are what your users notice. These numbers are from run 1; run 2 gave the same result.

Key point: Four of the five SDKs sent traces in the background, so the app's p99 latency stayed within 5 ms of normal while the server was down. What they did with the traces differed: Opik saved failed sends to a file and AcruxCore kept them in memory, and both delivered every trace after the outage. MLflow and Langfuse dropped most of them.

How we tested​

The test has four 5-minute phases: healthy, down, slow, and recovery, when the server is healthy again. The app sends 20 requests a second the whole time, and each request is one trace with two spans.

How the outage test works: the app sends traces through the SDK and a proxy to the tracing server, which is healthy, then down, then slow, then healthy again

One machine (24 cores, 62 GiB) ran everything: the app, a mock model, a proxy and the tool's server. Each server came from its official Docker Compose setup, started empty for each run, as in our self-hosting test.

  • The app is an async Python service. Each request opens a root span, calls the mock model inside a child span, and returns. The mock model answers every call after 100 ms, so any change in request time comes from the SDK.
  • The load is 20 requests a second, scheduled whether or not earlier requests have finished. A request's latency counts from the moment it was due, so if the SDK blocks the app, the requests waiting behind it count as late. With no tracing, about 2 requests run at a time. A request that arrives while 200 are still running is turned away (rejected at once), as a server at its connection limit would do.
  • The SDKs run at their default settings, at the versions in the first table. Opik's SDK and server are both version 2.2.143.
  • Down: the proxy between the SDK and the server refuses connections, and the tool's containers are stopped. After 5 minutes the containers start again, and the proxy stays closed until the server passes its health check.
  • Slow: the proxy holds every byte the server sends back for 5 s. The server gets each request at once and does its work; only the answer is late.
  • Counting happens in each tool's own database after the run, once the stored count has not changed for 2 minutes. A trace is lost if its root span is not there, and incomplete if the root is there without its child span.

The AcruxCore numbers come from SDK 0.24.0. The AcruxCore section explains how it retries.

While the server is down​

Opik and AcruxCore kept every trace. They stored the failed sends and delivered them once the server was back, in two different ways:

  • Opik writes failed messages to a local SQLite file and replays them when the connection returns. Its log said so as it happened: Failed to process message: 'CreateSpansBatchMessage' due to connection error. Will be retried later when connection is restored.
  • AcruxCore keeps the spans from failed sends in memory and sends them again after a growing pause, up to 30 s. The buffer holds 20,000 spans, about 8 minutes of this load. It printed one warning: trace report failed — retrying: All connection attempts failed.

Langfuse lost 6,100 of 6,284 traces (97%). The Langfuse SDK is built on OpenTelemetry's batch processor. Each batch gets retries for up to 5 s, the SDK's default timeout, and then the SDK drops it with Failed to export spans batch due to timeout, max retries or shutdown. A five-minute outage is much longer than any batch's 5 s of retries. Langfuse also lost 68 more traces from the end of the healthy phase. They were still in the SDK's queue, which sends a batch every 5 s, when the server went away.

MLflow lost 5,510 of 6,244 traces (88%). MLflow exports each trace from a queue of up to 1,000 traces, with 10 worker threads. While the server was down the workers kept retrying, the queue filled, and MLflow logged Trace export queue is full, trace will be discarded.

Phoenix stopped the app. phoenix.otel.register() uses OpenTelemetry's simple span processor unless you pass batch=True. The simple processor sends each span as soon as it ends, on the thread that ended it, which here is the app's event loop. With the server down, each send waited up to 10 s for retries, and nothing else in the app could run meanwhile. The app turned away 5,867 of 6,168 requests (95%). The 301 it accepted took about 10 minutes each to finish, and 13 of them ended in an error, because the app's own call to the model timed out while connecting.

While the server is slow​

A server that is down refuses a send at once. A slow server keeps each send waiting 5 s, so this phase tests how many sends an SDK can run at the same time.

  • MLflow lost 5,051 of 5,756 traces (88%), and 87 of the 705 traces it stored had no child span. With 10 workers and 5 s per answer, MLflow can send at most about 2 traces a second, and the app made 20.
  • Phoenix's app was still working through requests from the outage and turned away all 5,832 that arrived. Each span it finished waited 5 s for the server's answer.
  • Langfuse, Opik and AcruxCore lost nothing. Langfuse logged 29 failed batches in this phase, yet every trace reported in the phase was stored. The proxy delivers each request at once, so the server most likely stored those batches even though its answer came after the SDK's 5 s timeout.
  • Opik slowed the app. Its memory grew from 101 MiB to 172 MiB as it queued, and the app's p99 latency rose by 52 ms. In the recovery phase, while Opik replayed the traces it held, the rise was 59 ms and memory peaked at 175 MiB. Opik also added 14 ms at p99 in the healthy phase, the most of any SDK.

When the server comes back​

After recovery, every SDK delivered what it still held. This table shows how long that took.

ToolSeconds until the backlog was storedBacklog traces stored
Langfuse711,832 of 18,000
MLflow77,436 of 18,000
Phoenix116,279 of 18,000
AcruxCore3218,000 of 18,000
Opik3818,000 of 18,000

How to read this table:

  • Backlog traces stored counts the requests due before recovery (15 minutes at 20 a second, so 18,000) whose trace the database held at the end. For Phoenix, most of the 18,000 were requests the app turned away, which never made a trace. A few traces lost or never made in the other phases are also missing, so a count is not exactly 18,000 minus the two "Traces lost" cells.
  • Seconds until the backlog was stored runs from the moment the server answered again until that count stopped growing. We checked the count every 5 s, so each time is accurate to about 5 s.
  • Langfuse, MLflow and Phoenix finished first because they had dropped most of the outage's traces, so they had few left to send. AcruxCore and Opik took longer because they still held every trace from the outage.

No tool stored a trace twice.

What the SDK told us​

No SDK raised an exception into the app's code. Each one wrote about the outage to the log instead, at very different volumes. Lines about the outage over the whole run:

  • AcruxCore: 1 warning, when the first send failed.
  • Opik: 7 lines, saying messages would be retried and then that they were replayed.
  • MLflow: 26 lines, 19 of them Trace export queue is full.
  • Langfuse: 148 lines, a retry warning and a Failed to export line for each dropped batch.
  • Phoenix: 180 lines of the same two OpenTelemetry messages.

Settings that change the result​

We measured the defaults first. These settings change the outcome:

  • Phoenix: pass batch=True to register(). Phoenix then sends spans from a background thread, like the other SDKs. In our run with it, the app's p99 latency rose by at most 1 ms, and Phoenix lost 5,812 of 6,166 traces while the server was down (94%), much like Langfuse. It lost none while the server was slow.
  • Langfuse: the OpenTelemetry queue holds 2,048 spans, and a batch gets retries for up to 5 s (LANGFUSE_TIMEOUT). A longer queue (OTEL_BSP_MAX_QUEUE_SIZE) holds more spans, but a batch is still dropped once its retries run out.
  • MLflow: MLFLOW_ASYNC_TRACE_LOGGING_MAX_QUEUE_SIZE (default 1,000 traces) sets how much it holds, and MLFLOW_ASYNC_TRACE_LOGGING_MAX_WORKERS (default 10) sets how many sends run at once.
  • AcruxCore: max_queued_spans (Python) or maxQueuedSpans (Node) sets the buffer, 20,000 spans by default. Holding the outage's backlog took about 10 MiB: in both runs the app used 37 MiB before the outage and peaked at 47 to 48 MiB after it.

Run 2​

Each tool ran twice, and the second run gave the same result. Share of traces lost, run 1 and run 2:

ToolLost while down, run 1 / run 2Lost while slow, run 1 / run 2
Opik0% / 0%0% / 0%
AcruxCore0% / 0%0% / 0%
MLflow88% / 88%88% / 87%
Langfuse97% / 97%0% / 0%
Phoenix, defaultapp turned away 95% / 95% of requestsapp turned away all requests in both runs
Phoenix, batch=True (one run only)94%0%

How to read this table:

  • Lost while down and Lost while slow are the share of traces reported in that phase that never reached the database, as in the first table. For Phoenix's default setup they are the share of requests the app turned away.
  • The batch=True row is one run of Phoenix with its one non-default setting, described in the previous section.
  • Run 2 counts, lost while down and lost while slow: Opik 0 of 6,387 and 0 of 5,613; AcruxCore 0 of 6,231 and 0 of 5,769; MLflow 5,530 of 6,264 and 4,978 of 5,736; Langfuse 6,132 of 6,316 and 0 of 5,684. Phoenix turned away 5,846 of 6,147 requests while down and all 5,853 while slow.

How AcruxCore handles this​

The AcruxCore SDKs send traces from a background queue, so a trace never adds a network call to your request. When a send fails, the queue keeps the batch and decides what the failure means:

  • No answer at all, or 408, 429, 502, 503 or 504: the server is down, restarting or overloaded. The batch goes back to the front of the queue and is sent again after 1 s, then 2 s, 4 s and so on, up to 30 s.
  • 500: the server answered and failed on this batch. It gets three attempts, so one bad batch cannot block the rest.
  • Any other 4xx: the batch is dropped.

The server stores a re-sent span once, keyed on its trace and span ID. If the server stores a batch but its answer never reaches the SDK, the SDK sends the batch again, and the server still keeps one copy. The buffer is the only memory limit: 20,000 spans by default, and past that the SDK drops the oldest spans with one warning. close() waits at most 10 s for a server that is still down, then says how many spans it could not send.

The Python SDK reference lists the options, and the code is in span_queue.py.

What we did not test​

  • Node SDKs. Every number here is from the Python SDKs, and the Node SDKs use different queues.
  • An app restart during the outage. Opik keeps failed sends in a SQLite file in a temporary folder, and we did not test whether they survive an app restart. The other four keep their queue in memory, so it is gone if the app restarts while the server is down.
  • Hosted versions. A hosted service has outages too, but you cannot choose when, so we tested the self-hosted servers.
  • Other loads. At a higher request rate every buffer fills sooner, and at a lower one, later.

Reproduce these numbers​

GitHub

tracing-server-outage/ — the app, the proxy, the run script and every raw reading.

python run.py <tool> r1 runs one tool through the four phases in about 25 minutes, and python summarize.py prints the tables in this post. NOTES.md lists the versions and every incident during the runs.

FAQ​

Does Langfuse lose traces when the server is down?​

In our test, yes: 97% of the traces reported during a five-minute outage, in both runs. The Langfuse Python SDK retries each batch for up to 5 s and then drops it. The app kept running, and the SDK logged each dropped batch.

Can tracing slow down my app when the tracing server is down?​

It can if spans are sent on the request's own thread. Phoenix's register() does that unless you pass batch=True, and our app turned away 95% of its requests during the outage. The other four SDKs send from a background thread or queue, and added at most 5 ms at p99 while the server was down.

Which tracing SDK keeps traces through an outage?​

Opik and AcruxCore both delivered every trace from a five-minute outage. Opik writes failed sends to a local file. AcruxCore keeps up to 20,000 spans in memory, about 8 minutes at 20 requests a second; raise max_queued_spans to cover longer.

Does a slow tracing server hurt more than a down one?​

For MLflow it hurt as much: it lost 88% of traces in both phases, and the slow phase also left 87 traces without their child span. Langfuse lost nothing while the server was slow but 97% while it was down. Opik lost nothing in either phase but slowed the app by 52 ms at p99 while the server was slow.