Redis can't write to disk when trying to merge a user

I am trying to merge users using:

rake users:merge['source_username','target_username']

and getting the following error:

rake aborted!
Redis::CommandError: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis/client.rb:119:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis.rb:796:in `block in setex'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis.rb:45:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis.rb:45:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis.rb:795:in `setex'
/var/www/discourse/lib/discourse_redis.rb:188:in `block (3 levels) in <class:DiscourseRedis>'
/var/www/discourse/lib/discourse_redis.rb:153:in `ignore_readonly'
/var/www/discourse/lib/discourse_redis.rb:188:in `block (2 levels) in <class:DiscourseRedis>'
/var/www/discourse/lib/post_revisor.rb:270:in `original_raw='
/var/www/discourse/lib/post_revisor.rb:232:in `revise_post'
/var/www/discourse/lib/post_revisor.rb:156:in `block in revise!'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/lib/post_revisor.rb:155:in `revise!'
/var/www/discourse/app/models/post.rb:515:in `revise'
/var/www/discourse/app/models/post.rb:591:in `set_owner'
/var/www/discourse/app/services/post_owner_changer.rb:23:in `block in change_owner!'
/var/www/discourse/app/services/post_owner_changer.rb:14:in `each'
/var/www/discourse/app/services/post_owner_changer.rb:14:in `change_owner!'
/var/www/discourse/app/services/user_merger.rb:66:in `change_post_owner'
/var/www/discourse/app/services/user_merger.rb:48:in `block in move_posts'
/var/www/discourse/app/services/user_merger.rb:46:in `each'
/var/www/discourse/app/services/user_merger.rb:46:in `move_posts'
/var/www/discourse/app/services/user_merger.rb:11:in `merge!'
/var/www/discourse/lib/tasks/users.rake:48:in `block in <top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => users:merge

I am hoping it’s something that can be fixed without running a launcher rebuild app. I am running v2.2.0.beta9 +2

Is your disk full?

Then you should switch to a two-container install so you can rebuild with minimal downtime.

1 Like

Disk is definitely not full… I’ve not seen anything on this “two-container” install… will have to investigate.

See How to move from standalone container to separate web and data containers and Managing a Two-Container Installation - Documentation - Literate Computing Support (and https://www.literatecomputing.com/product/switch-discourse-to-two-container-configuration/ if you need help).

1 Like