pangolin keeps polling - cpu is used
- Dominant language
- TypeScript
- Stars
- 22.8k
- Forks
- 783
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 52
Description
### Describe the Bug
While there is no traffic (also no blocked one) the cpu is constantly using about 5%
This is not a drama but maybe a chance of improvement.
I have no idea if this is by intention, if so, please close this issue.
### Environment
- OS Type & Version: Linux pangolin 6.17.2-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.17.2-2 (2025-11-26T12:33Z) x86_64 GNU/Linux (LXC on proxmox with docker containers)
- Pangolin Version: 1.14.1
- Gerbil Version: -
- Traefik Version: v3.6.4
- Newt Version: -
- CrowdSec: no version found, latest (Jan 2026)
### To Reproduce
top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4757 root 20 0 17.3g 312572 38724 S 5.3 29.8 2:50.27 MainThread
123 root 20 0 1868244 39016 22620 S 0.3 3.7 0:05.17 containerd
note PID '4757' of process 'MainThread'
(apt install strace)
strace -tt -p 4757
strace: Process 4757 attached
09:33:10.183308 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.184519 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.184596 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.185804 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.185845 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.185909 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.187027 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.187114 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.188257 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.188323 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.189481 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
09:33:10.189547 epoll_pwait(13, [], 1024, 1, NULL, 8) = 0
09:33:10.190705 epoll_pwait(13, [], 1024, 0, NULL, 8) = 0
...
The 'AI' says: indication for busy-polling, the event loop never sleeps.
### Expected Behavior
lower CPU when idle
Contributor guide
Research direction
Start from the MainThread process and reproduce the idle workload with top and strace as shown in the issue. Trace the event loop behavior around the repeated epoll_pwait calls, then verify that Pangolin uses less CPU when idle without traffic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100