Describe the bug
CrowdSec v1.7.8 gradually accumulates CPU usage over days/weeks until it consumes 345%+ CPU. The process starts at ~5% after restart and slowly climbs without bound. After 13 days of uptime, systemd reported the process consumed 3 weeks 2 days 14 hours of CPU time.
The log volume being processed is minimal (~8.5k lines from auditd, ~47 from auth.log), so this is not caused by high throughput.
To Reproduce
- Install CrowdSec v1.7.8 on Ubuntu 24.04
- Configure acquisition for
/var/log/audit/audit.log (auditd) and /var/log/syslog
- Let it run for 7-14 days
- Observe CPU usage climbing from ~5% to 100%+ over time
Expected behavior
CPU usage should remain stable at ~5-10% regardless of uptime duration.
Evidence
Systemd stop output after 13 days:
May 20 01:49:00 Media-Server systemd[1]: crowdsec.service: Consumed 3w 2d 14h 58min 23.887s CPU time, 573.9M memory peak, 66.0M memory swap peak.
Process state at discovery:
root 3363534 345% 1.0 3110892 159888 ? Rsl May13 34007:09 /usr/bin/crowdsec -c /etc/crowdsec/config.yaml
After restart:
root 2781659 5.8% 1.2 2385428 205484 ? Ssl 01:49 0:32 /usr/bin/crowdsec -c /etc/crowdsec/config.yaml
Acquisition metrics (showing minimal volume):
| Source | Lines read | Lines parsed | Lines unparsed |
| file:/var/log/audit/audit.log | 8.59k | 8.46k | 128 |
| file:/var/log/auth.log | 47 | 17 | 30 |
Acquisition config
filenames:
- /var/log/audit/*.log
labels:
type: auditd
source: file
---
filenames:
- /var/log/messages
- /var/log/syslog
- /var/log/kern.log
labels:
type: syslog
source: file
---
filenames:
- /var/log/nginx/*.log
labels:
type: nginx
source: file
Parsers installed
- crowdsecurity/auditd-logs
- crowdsecurity/sshd-logs
- crowdsecurity/nginx-logs
- crowdsecurity/http-logs
Environment
- CrowdSec version: v1.7.8-debian-pragmatic-amd64-63227459
- Go version: 1.26.2
- OS: Ubuntu 24.04 LTS (kernel 6.8.0-111-generic)
- Platform: linux/amd64 (Hetzner CPX42)
- RAM: 16GB
- Installed via: apt (debian package)
Workaround
Weekly or watchdog-based systemctl restart crowdsec prevents the leak from becoming critical. A watchdog script checking CPU > 50% for 30 minutes and restarting is our current mitigation.
Additional context
- The leak appears to be in the Go runtime or parser goroutines, not in log processing volume
- Memory peaks at ~574MB which is high for processing <10k lines
- The auditd-logs parser chain (child-child-child-crowdsecurity/auditd-logs) may be involved
- No panics or errors in journalctl logs — it just silently consumes more CPU over time
Describe the bug
CrowdSec v1.7.8 gradually accumulates CPU usage over days/weeks until it consumes 345%+ CPU. The process starts at ~5% after restart and slowly climbs without bound. After 13 days of uptime, systemd reported the process consumed 3 weeks 2 days 14 hours of CPU time.
The log volume being processed is minimal (~8.5k lines from auditd, ~47 from auth.log), so this is not caused by high throughput.
To Reproduce
/var/log/audit/audit.log(auditd) and/var/log/syslogExpected behavior
CPU usage should remain stable at ~5-10% regardless of uptime duration.
Evidence
Systemd stop output after 13 days:
Process state at discovery:
After restart:
Acquisition metrics (showing minimal volume):
Acquisition config
Parsers installed
Environment
Workaround
Weekly or watchdog-based
systemctl restart crowdsecprevents the leak from becoming critical. A watchdog script checking CPU > 50% for 30 minutes and restarting is our current mitigation.Additional context