Ghost failed to update from 3.22.2 to 3.23.0

Doing upgrades from 3.22.2 to 3.23.0 on a ghost site at some point the server crashed due to cpu spike. After restarting the server (from AWS as the terminal was frozen) the failed site is not starting anymore (ghost restart or ghost start… hangs at starting…).

Tried ghost doctor, but it didn’t give any error:
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking operating system compatibility

  • sudo systemctl is-active ghost_secareanu-com
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking binary dependencies

Tried to do a rollback (as suggested) but got the error below:
:information_source: Downloading and updating Ghost [skipped]

  • sudo /var/www/secareanu.com/current/node_modules/.bin/knex-migrator-rollback --force --v 3.22.2 --mgpath /var/www/secareanu.com/current
    :heavy_multiplication_x: Rolling back database migrations
    A ProcessError occurred.

Message: The database migration in Ghost encountered an error.
Help: https://ghost.org/faq/upgrade-to-ghost-2-0/#what-to-do-when-an-upgrade-fails
Suggestion: ghost update --rollback

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.21.0
Ghost Version: 3.23.0
Ghost-CLI Version: 1.14.1
Environment: production
Command: ‘ghost update --rollback’

Tried to update ghost-cli just in case, but still didn’t manage to fix anything.

Anyone has any ideas what could have happened and how I can exist this deadlock (maybe reinstall ghost)?

Thanks!

LE: It seems that my current/node_modules/ folder is incomplete (probably didn’t finish update when the server crashed). I’ve copied over from another site and now I’ve managed to restart the site.

I still have issues upgrading Ghost, it seems that yarn and ghost cli have something with me these days… :slight_smile:

:heavy_multiplication_x: Downloading and updating Ghost to v3.25.0
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress
warning ghost@3.25.0: The engine “cli” appears to be invalid.
warning Resolution field “moment-timezone@0.5.23” is incompatible with requested version “moment-timezone@0.5.28”
warning Resolution field “moment-timezone@0.5.23” is incompatible with requested version “moment-timezone@0.5.28”
warning " > bookshelf@0.15.2" has incorrect peer dependency “knex@>=0.13.0 <0.18.0”.

yarn install v1.22.4
[1/5] Validating package.json…
[2/5] Resolving packages…
[3/5] Fetching packages…
info fsevents@2.1.2: The platform “linux” is incompatible with this module.
info “fsevents@2.1.2” is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies…
[5/5] Building fresh packages…

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.21.0
Ghost Version: 3.24.0
Ghost-CLI Version: 1.14.1
Environment: production
Command: ‘ghost update’

I had to increase the instance size to get the ghost update process to complete… it seems that it now eats more resources (just when updating, as the sites on the server consume minimal resources as they do not have that much traffic).