Troubleshooting¶
Solutions for common issues and frequently asked questions about BigBrotr.
Common Issues¶
"Connection refused"¶
Symptom: Services fail to start with a connection error to the database.
Solution:
-
Check that PostgreSQL and PGBouncer are healthy:
-
Verify
pool.database.hostinconfig/brotr.yaml:- In Docker: use the service name (
pgbouncerorpostgres) - Outside Docker: use
localhost
- In Docker: use the service name (
-
Ensure the database port is correct and not blocked by a firewall.
"DB_WRITER_PASSWORD environment variable not set"¶
Symptom: Service exits immediately on startup with a configuration error about a missing password environment variable.
Solution:
Writer services (seeder, finder, validator, monitor, synchronizer, refresher) use DB_WRITER_PASSWORD. Read-only services use DB_READER_PASSWORD. Set the appropriate variable:
-
Set the environment variable:
"Pool exhausted"¶
Symptom: Queries time out or services log "pool exhausted" warnings.
Solution:
-
Increase the pool size in
config/brotr.yaml: -
Increase the acquisition timeout:
-
Check for long-running queries:
"Timeout connecting to relay"¶
Symptom: Validator or Monitor logs show frequent relay timeout errors.
Solution:
-
Increase timeouts in the service config:
-
Reduce concurrency if the host is resource-constrained:
Tip
Tor relays typically need 30--60 seconds for connections. I2P relays may need 45--60 seconds.
"Out of disk space"¶
Symptom: PostgreSQL stops accepting writes or Docker containers fail to start.
Solution:
-
Check disk usage:
-
Run a full vacuum on large tables:
-
Prune unused Docker resources:
-
Consider switching to LilBrotr for approximately 60% disk savings.
"Validation error for MonitorConfig"¶
Symptom: Monitor service fails to start with a Pydantic validation error about store flags.
Solution: The store flags must be a subset of the compute flags. You cannot store metadata that is not computed:
processing:
compute:
nip66_geo: true
nip66_dns: false
store:
nip66_geo: true
nip66_dns: false # Must be false because compute.nip66_dns is false
Service not starting¶
Symptom: A service container shows as unhealthy or restarts repeatedly.
Solution:
-
Check the logs:
-
Inspect the health check status:
-
Try running the service in one-shot mode with debug logging:
Frequently Asked Questions¶
What is the difference between BigBrotr and LilBrotr?¶
BigBrotr stores complete Nostr events including tags (JSON), content, and sig. It provides 11 materialized views for analytics and uses more disk space.
LilBrotr stores only event metadata: id, pubkey, created_at, kind, and tagvalues (extracted single-char tag values). It omits tags JSON, content, and signatures, resulting in approximately 60% disk savings. All 11 materialized views are available in both variants.
Both use the same services and codebase. The only difference is the SQL schema.
Do I need to run all six services?¶
No. The only required services are:
- Seeder (one-shot) -- populates the initial candidate list
- Finder -- discovers new relay URLs
- Validator -- tests connectivity and promotes candidates to the relay table
The remaining services are optional:
- Monitor -- performs NIP-11/NIP-66 health checks and publishes Nostr events. Required if you want relay metadata.
- Synchronizer -- archives events from validated relays. Required only if you want to store Nostr events.
- Refresher -- refreshes materialized views. Required only if you use analytics views.
How much disk space does BigBrotr use?¶
Disk usage depends on the number of relays monitored and events archived:
| Component | Approximate size |
|---|---|
| PostgreSQL base (schema + indexes) | ~50 MB |
| Relay metadata (1000 relays) | ~200 MB |
| Events (1M events, BigBrotr schema) | ~2--5 GB |
| Events (1M events, LilBrotr schema) | ~0.8--2 GB |
Tip
Use the synchronizer.yaml filter.kinds setting to archive only specific event kinds, reducing storage significantly.
What happens when a service crashes?¶
All long-running services (finder, validator, monitor, synchronizer, refresher) have restart: unless-stopped in Docker Compose. When a service crashes:
- Docker restarts the container automatically after
RestartSec(10s default). - The service picks up where it left off using cursor state stored in the
service_statetable. - After
max_consecutive_failures(default: 5) consecutive failures, the service stops to avoid a crash loop.
For systemd deployments, the Restart=always directive provides the same behavior.
How do I upgrade to a new version?¶
-
Pull the latest code:
-
Check the changelog for breaking changes or new migration steps.
-
Rebuild and restart:
-
If the upgrade includes SQL migrations, apply them before restarting services:
Related Documentation¶
- Docker Compose Deployment -- deployment reference
- Manual Deployment -- systemd and bare-metal setup
- Monitoring Setup -- verify service health with Prometheus
- Backup and Restore -- protect against data loss
- Tor and Overlay Networks -- diagnose overlay network issues