open-telemetry / open-telemetry/opentelemetry-cpp

Crash in http exporter, for tcp half open connections

Open
#3,333 4 comments 0 reactions 2 assignees View on GitHub

@jonshung is already working on this.

Since May 21, 2026.

bug triage/accepted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

Steps to reproduce
Sudden bring down of otel collector in a high load setup.

What is the expected behavior?
Clients handling export failures

What is the actual behavior?
Hang on export, 30+ seconds. We can see one connection stuck in half open, one stuck in connect SYN_SENT... note that server is gone for some time at this point.

netstat -nap | grep 4318
tcp 0 0 192.168.67.174:51510 192.168.10.101:4318 ESTABLISHED 23/smfcc
tcp 0 1 192.168.67.174:43912 192.168.10.101:4318 SYN_SENT -

Additional context
We suspect this crash is due to otel not providing way to set keep alives on client connections (CURLOPT_TCP_KEEPALIVE)... we've set timeout (CURLOPT_TIMEOUT) to 5s, and ideally for that CURLOPT_TCP_KEEPALIVE should be set to 1s, but otel doesn't have an option to set that.

Request that a config for TCP_KEEPALIVE be provided.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.