cloudflare / cloudflare/cloudflared

Sse uses too much cpu

Open
#1,325 1 comment 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

When a user reaches a page on my [website](https://www.merklemap.com/) that uses sse, the CPU gets pinned to 100% usage and does not go down until the process is restarted.

Example endpoint: https://api.merklemap.com/live-domains

image

**To Reproduce**
Steps to reproduce the behavior:
1. Produce an endpoint that produce data over sse (or proxy to the api above).
2. Observe the cpu usage

If it's an issue with Cloudflare Tunnel:

```
ID NAME CREATED CONNECTIONS
e87feb54-2f48-4377-a0fe-2a8e97272530 merklemap 2024-09-04T16:39:25Z 1xams08, 1xams15, 2xhel01
```
With default settings.

**Environment and versions**
```
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
```

- Architecture: AMD EPYC 9454P
- cloudflared version 2024.8.3 (built 2024-08-22-1348 UTC)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.