Thanks for all the responses and extra detail.
Indeed, the search for OOM and similar would probably be useful before a reboot, not after. So yes please repeat, if you have not yet rebooted.
Running
vmstat 5
concurrently, in a second connection, as the rebuild hits the critical section, could be informative.
But really I have only two hypotheses
- shortage of memory which might cause slow progress or might cause something to be terminated
- running out of time because of slow progress
It is a pity your provider does not allow both increases and decreases of RAM.
It is true that initial installation, and subsequent updates which require rebuilds every month or two, require more memory than previously. But
memory=RAM+swap
so adding swap should be successful, provided there is no time pressure.
You have lots of disk. I recommend you add a second and a third swapfile. See the instructions here, modified to make new files
You already have /swapfile so run these commands with /swapfile.1 and /swapfile.2 instead
Afterwards
swapon
should show three files in use, or ready for use, and
free
should show about 2G RAM and about 6G of swap
Then try again!
Edit: I notice my 1G RAM instance has
db_shared_buffers: "128MB"
in the app.yml
Be very careful when modifying app.yml - do not add or remove spaces!