A user encountered a failed bootstrap and 500 errors after updating Discourse, with errors indicating a corrupted database state, including issues with xlog flush and existing database objects. mpalmer identified the problem as severe database corruption, likely due to disk space issues, and asked about backups. robreed confirmed having recent backups and provided system stats showing sufficient disk and memory. Steven suggested a solution involving destroying the app and removing the PostgreSQL data to reset the database, which robreed confirmed resolved the issue. codinghorror clarified the correct Docker commands to use.
Received bundler out of date message updating Discourse, so I built the container as advised. That seemed to work except that I got a message that there was already a server running on port 80. Tried rebooting the server. Now server’s throwing off a 500 error loading any page.
Admittedly I’m out of my depth with docker and discourse.
Tried rebuilding container bc… no good reason which generates the following error.
FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 297 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
Rerunning ./launcher rebuild app, the only errors…
database "discourse" already exists
...
role "discourse" already exists
...
column "like_notification_frequency" of relation "user_options" already exists
...
StandardError: An error has occurred, this and all later migrations canceled:
...
FATAL: xlog flush request 0/E91964B8 is not satisfied --- flushed only to 0/E9159030
…
and the process ends
2016-03-02 23:41:44 UTC [67-6] LOG: abnormal database system shutdown
195:M 02 Mar 23:41:44.148 # User requested shutdown...
195:M 02 Mar 23:41:44.149 * Saving the final RDB snapshot before exiting.
195:M 02 Mar 23:41:44.271 * DB saved on disk
195:M 02 Mar 23:41:44.272 # Redis is now ready to exit, bye bye...
Something really bad is going on here. Your database is in a completely pantsed state. xlog flush request is not satisfied smells… diskspacey, maybe? At any rate, you’ve broken something real good. How’s your backups?
Please paste the output of df -h, free -m, docker info and docker version.