Runner daemon (archivebox run --daemon) pegs one CPU core at ~95-100% even with empty queue, on both 0.9.51 (latest) and 0.9.56rc28 (dev)
Provide a screenshot and describe the bug
I'm running ArchiveBox in Docker (both archivebox/archivebox:latest at version 0.9.51, and archivebox/archivebox:dev at version 0.9.56rc28 — same behavior on both). The archivebox run --daemon process (the runner worker started by supervisord alongside daphne/sonic) consumes 90-100% of one CPU core continuously, even when the collection has no pending work.
Collection state at the time of testing: 8 snapshots total, all sealed. ArchiveResult status breakdown: Counter({'succeeded': 129, 'noresults': 23, 'failed': 10, 'skipped': 6}) — no started or queued entries. No CrawlSchedule records exist. Crawl objects also show nothing pending. So there is genuinely nothing for the runner to do, yet it stays pegged.
/proc/<runner_pid>/wchan is empty, meaning the process is not blocked on any kernel syscall — it's a pure userspace busy loop, not waiting on I/O.
I captured a py-spy dump of the runner process while it was at ~96% CPU:
Thread (active+gil): "MainThread" get_order_by (django/db/models/sql/compiler.py:509) pre_sql_setup (django/db/models/sql/compiler.py:90) as_sql (django/db/models/sql/compiler.py:786) execute_sql (django/db/models/sql/compiler.py:1630) results_iter (django/db/models/sql/compiler.py:1592) iter (django/db/models/query.py:336) _fetch_all (django/db/models/query.py:2287) iter (django/db/models/query.py:473) first (django/db/models/query.py:1228) _first_due_id (archivebox/services/runner.py:1773) _run_due_snapshot_query (archivebox/services/runner.py:1814) run_pending_crawls (archivebox/services/runner.py:2022) run_runner (archivebox/cli/archivebox_run.py:307) main (archivebox/cli/archivebox_run.py:373)
So the daemon loop in run_pending_crawls is calling _run_due_snapshot_query → _first_due_id (a Django ORM .order_by(...).first() query) in what appears to be a tight loop with no sleep/backoff between iterations when the query returns nothing. Looking at the API docs, run_pending_crawls(*, daemon: bool = False, ...) doesn't expose any poll-interval configuration option, so there doesn't seem to be a way to work around this via config.
Steps to reproduce
Run ArchiveBox in Docker with archivebox server (which starts the runner via supervisord)
Have a collection with zero pending/queued crawls or snapshots
Watch docker stats — the container sits at ~95-105% CPU indefinitely
ps aux inside the container shows the archivebox run --daemon process in state R continuously, not SLogs or errors
ArchiveBox Version
0.9.51
ArchiveBox v0.9.51 COMMIT_HASH=b5646cc BUILD_TIME=2026-09-23 20:04:11 1790193851
IN_DOCKER=True IN_QEMU=False ARCH=x86_64 OS=Linux
PLATFORM=Linux-4.4.302+-x86_64-with-glibc2.41 PYTHON=Cpython (venv)
EUID=1032:100 UID=0:0 ARCHIVEBOX_USER=1032:100 FS_UID=1032:65537 FS_PERMS=644
FS_ATOMIC=True FS_REMOTE=True
DEBUG=False IS_TTY=False SUDO=True ID=9c66c4b6:f9095ffe SEARCH_BACKEND=sonic
LDAP=False
Binary Dependencies:
Binary Plugin Path
archive… archivewebpage /opt/archivebox/lib/chromewebstore/extensions/ar…
node chrome, claudeco… /opt/archivebox/lib/env/bin/node
abxbus chrome /opt/archivebox/lib/pnpm/packages/abxbus/node_mo…
browsers chrome /opt/archivebox/lib/pnpm/packages/chrome/node_mo…
chromium chrome /opt/archivebox/lib/playwright/bin/chromium
claudec… claudechrome disabled by CLAUDECHROME_ENABLED=False
claude claudecode disabled by CLAUDECODE_ENABLED=False
defuddle defuddle /opt/archivebox/lib/pnpm/packages/defuddle/node_…
forum-dl forumdl /opt/archivebox/lib/uv/packages/forum-dl/venv/bi…
gallery… gallerydl /opt/archivebox/lib/uv/packages/gallery-dl/venv/…
git git, opencode /opt/archivebox/lib/env/bin/git
istilld… istilldontcareab… /opt/archivebox/lib/chromewebstore/extensions/is…
lit liteparse /opt/archivebox/lib/pnpm/packages/liteparse/node…
tessera… liteparse /opt/archivebox/lib/env/bin/tesseract
convert liteparse /opt/archivebox/lib/env/bin/convert
postlig… mercury /opt/archivebox/lib/npm/packages/mercury/node_mo…
npm opencode disabled by OPENCODE_ENABLED=False
opencode opencode disabled by OPENCODE_ENABLED=False
opendat… opendataloader disabled by OPENDATALOADER_ENABLED=False
java opendataloader disabled by OPENDATALOADER_ENABLED=False
ots opentimestamps disabled by OPENTIMESTAMPS_ENABLED=False
papers-… papersdl /opt/archivebox/lib/uv/packages/papers-dl/venv/b…
feedpar… parse_rss_urls /opt/archivebox/lib/uv/packages/parse_rss_urls-6…
readabi… readability /opt/archivebox/lib/pnpm/packages/readability/no…
rg search_backend_r… /opt/archivebox/lib/env/bin/rg
sonic search_backend_s… /opt/archivebox/lib/env/bin/sonic
singlef… singlefile /opt/archivebox/lib/chromewebstore/extensions/si…
tlsnota… tlsnotary disabled by TLSNOTARY_ENABLED=False
trafila… trafilatura /opt/archivebox/lib/uv/packages/trafilatura-2.1.…
twocapt… twocaptcha /opt/archivebox/lib/chromewebstore/extensions/tw…
ublock ublock /opt/archivebox/lib/chromewebstore/extensions/ub…
wget wget /opt/archivebox/lib/env/bin/wget
yt-dlp ytdlp /opt/archivebox/lib/uv/packages/yt-dlp/venv/bin/…
ffmpeg ytdlp /opt/archivebox/lib/env/bin/ffmpeg
Code locations:
√ PACKAGE_DIR 24 files valid /venv/lib/python3.13/site-packages/archivebox
√ TEMPLATES_DIR 6 files valid /venv/lib/python3.13/site-packages/archivebox/templates
- CUSTOM_TEMPLATES_DIR missing unused ./custom_templates
- USER_PLUGINS_DIR missing unused ./custom_plugins
√ ABXPKG_LIB_DIR 10 files valid /opt/archivebox/lib
Data locations:
√ DATA_DIR 12 files @ valid /data
√ CONFIG_FILE 1.2 KB valid ./ArchiveBox.conf
√ SQL_INDEX 720.1 MB valid ./index.sqlite3
√
### How did you install the version of ArchiveBox you are using?
Docker (or Podman/LXC/K8s/TrueNAS/Proxmox/etc)
### What operating system are you running on?
Linux (Ubuntu/Debian/Arch/Alpine/etc.)
### What type of drive are you using to store your ArchiveBox data?
- [ ] some of `data/` is on a local SSD or NVMe drive
- [x] some of `data/` is on a spinning hard drive or external USB drive
- [ ] some of `data/` is on a network mount (e.g. NFS/SMB/Ceph/GlusterFS/etc.)
- [ ] some of `data/` is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/Google Drive/Dropbox/etc.)
### Docker Compose Configuration
```shell
ArchiveBox Configuration
Source: ArchiveBox/ArchiveBox