What's the command for running the historical import?
Yes, unfortunately, there are both known and unknown issues with the import process (both the historical and "on-demand" imports), and it does get stuck. This is due to a combination of factors, ranging from misbehaving relays (e.g. relays purposefuly blocking Haven - nothing that I can do here -, dropping long subscriptions, getting stuck themselves, etc) to the fact that we're not leveraging the underlying libraries' mechanisms for retrying subscriptions, "grounding" flaky relays, and re-adding them using exponential backoff best practices to the best of its potential. On top of that, there are some hard to troubleshoot concurrency issues in Haven, Khatru, and the Event Stores that can lead to missing writes.
There’s a lot to fix here, as well as plenty of unknown unknowns. A proper fix for the entire import saga will likely only come after the Haven v2 release, as we’ll need to make several backwards-incompatible changes to address this properly. That said, if you collect any evidence that might help us troubleshoot specific cases where the import is getting stuck, please feel free to update the relevant GitHub issue.
For now, while not ideal, what I’ve been doing is:
- Keeping the import relay list to a minimum (just 3 trustworthy relays)
- Restarting Haven daily with a cron job, just in case the on-demand import gets stuck
- Running a full historical import once a week
To be fair, there have been weeks where the full import didn’t find any new notes, which is a good sign. It likely means that external relays are becoming more stable and Haven's on-demand import process is getting stuck less frequently. I may even consider disabling the daily cron job at some point. But overall, I think the weekly historical import is still a necessary fallback, given how Nostr works with relays going offline and coming back all the time.
I'm considering adding a feature to Haven so that it can run historical imports in the background, removing the need for users to do it manually (cc: nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpr3mhxue69uhhyetvv9ujucnfw33k76twwpshy6ewvdhk6tcpzdmhxue69uhhwmm59e6hg7r09ehkuef0qy2hwumn8ghj7un9d3shjtn4w3ux7tn0dejj7ne6u4e). But to be honest, this is likely more than six months down the road as both Utxo and myself are a bit busy with other stuff, and I already have a giant backlog for Haven and Khatru. Unless, of course, some other contributor steps in, implements the feature and fixes the mentioned issues before I do 😅.
Discussion
Ran the above and it couldn't find any "haven" command.
`Command 'haven' not found, did you mean: command 'aven' from deb survex-aven (1.4.4-1build1) Try: sudo apt install
So I ran what was listed on the GitHub instead; namely `./haven --import` and it gave me this:
`bash: ./haven: Is a directory`
Not sure what it doesn't like about it, but that command doesn't seem to work in either form.