-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
When Docker shows ExitCode 0 with restarts > 0, the process is exiting cleanly at startup — not crashing at runtime. In bitmagnet this almost always means the fx dependency injection framework couldn't wire up successfully.
Common causes:
- Can't reach Postgres (wrong hostname, container not ready, network misconfiguration)
- Config validation error (malformed config.yml, bad env var value)
Diagnosis: Check the first ~20 lines of each restart cycle in docker logs bitmagnet. The error will be at the top, not buried in runtime output.
If using a sidecar deployment, make sure:
- The main instance has
DHT_CRAWLER_SIDECAR_ENABLED=trueandDHT_CRAWLER_SIDECAR_URL=http://gluetun:3333 - The sidecar runs
--keys=http_serveralongside--keys=dht_crawler - Both the main instance and gluetun are on the shared Docker network (
bitmagnet-net)
Note: the environment variable names use underscores between words — DHT_CRAWLER_SIDECAR_ENABLED, not DHT_CRAWLER_SIDECARENABLED.
If logs show "imported": 0, "new_results": 35+ every cycle, that indexer doesn't return torrent hashes and is not compatible with bitmagnet. Try a different indexer. See the compatibility list in Prowlarr Integration.
TMDB API calls route through the VPN exit node (if using gluetun). If that node has poor routing to TMDB's CDN, timeouts spike. The classifier automatically disables TMDB temporarily and re-enables when connectivity returns.
Fix: Try a different VPN server country, or set TMDB_ENABLED=false if you don't need content metadata.
During VPN instability, DNS for DHT bootstrap nodes times out. This shows as WARN in logs and triggers automatic reseed. These warnings are normal and recover on their own. Only investigate if the ktable stays empty for more than 10 minutes.
Postgres must NOT share gluetun's network namespace. If Postgres is on network_mode: service:gluetun, VPN drops take the database offline and cause crash loops.
Fix: Give Postgres its own Docker bridge network. See Gluetun VPN Deployment.
docker inspect --format='{{.State.ExitCode}} {{.RestartCount}} {{.State.Status}}' bitmagnet- ExitCode 0 + restarts = startup failure (config/connectivity)
- ExitCode 1 + restarts = runtime crash (check logs for panic)
- ExitCode 137 = OOM killed (increase memory limit in compose)