This evening I rebooted the host (though it’s uptime was under 2 weeks)
rebaking succeeded
# rake posts:rebake
Rebaking post markdown for 'default'
2950 / 2950 (100.0%)
2950 posts done!
-------------------------
but, as you suggested, this didn’t bring back the images. Ill start a new thread for that.
As for this issue (not being able to rebake ~2600 posts) Ill note that this thread seems useful:
EDIT: As for the initial issueI was trying to solve, this thread indicates that recover_from_tombstone is needed in addition to the rebuild, but that hasn’t worked yet.
I tried recover_from_tombstone. The command exited without warnings, and so I’m trying to rebuild.
That process fails at random places. I’ve tried rebooting the host, rebuilding the app, and it fails anywhere from 5-55% of the way through the rebake process. Note that there are only ~2950 posts… pretty small by discourse’s standards.
I am running a number of plugins, I’m not sure if that’s related:
I’ve tried a couple of times, and still had errors.
Since I posted, the missing images were fixed, and I’ve rebuilt the container. The rebake still failed, but after a reboot of the host I was able to get the rebake to succeed.
# ./launcher enter app
root@community-2019-app:/var/www/discourse# rake posts:rebake
Rebaking post markdown for 'default'
2976 / 2976 (100.0%)
2976 posts done!
That’s it, without a doubt. On 1GB it’s mandatory, on anything more than 1GB it’s only a matter of time before processes are killed when the system runs low on free memory:
The way linux handles memory changes fundamentally if you don’t have swap available. Think of an Android smartphone terminating background processes for hungrier foreground processes.
Sure but I had 2GB ram, and have nothing but discourse on this host, and still ran in to issues.
It’s quite possible that the rebake process is the only thing that would cause me grief, and I’m not sure I would have been doing that if hadn’t hit some obscure issue on my host, when trying to restore from a backup.
oh, you think that maybe I skipped a step? Wouldn’t shock me… I was setting up the new host knowing full well that I was just going to restore from backup. There’s a good chance that I never ran discourse-setup
If you copied the app.yml across you skipped that step entirely you’re basically in ‘no seatbelt’ mode.
You wouldn’t see the message about that, or any other of the system requirement checks which can save you pain down the line.
Discourse-setup doesn’t just create a fresh app.yml, it checks all of the common gotchas which hinder new installs. Docker, disk, memory, scaling defaults, whether ports are already in use, it’s all there.
What would be useful would be a way to pipe a migrated app.yml into discourse-setup, so that site-specific stuff could be treated as a default and preserved, while the other stuff would be configured for the system for the first time.
Thanks @Stephen… yeah I was out in a wasteland because I was “just” restoring from a backup.
In the end, anyone else having issues with rebake can find this thread & its solution. Also, due to the work @vinothkannans & team did recently relating to migrating images, my specific issue should be a moot point going forward.
Thanks again for the pointer on swap, it’s the solution to the problem I started with this thread.