Rebuilding the app fails due to disk out of space

AI-generated summary

In the Support category, user craisp reports that rebuilding the Discourse app fails with a “No space left on device” error during the installation of the mini_racer gem. The build process halts because the native extension installation cannot write to the disk, and the site is currently down.

User mpalmer initially asks for earlier log details but quickly identifies the root cause upon craisp sharing the error output. Despite craisp asking how to access specific log files, mpalmer points out that the error message [quote="craisp, post:3, topic:60070"]'./.gem.20170328-282-incgx4/mini_racer_extension.so': No space left on device[/quote] clearly indicates a full disk. The suggested solution is to free up space by running ./launcher cleanup and removing unnecessary files to resolve the installation failure.

I’m facing this issue running sudo ./launcher rebuild app:

An error occurred while installing mini_racer (0.1.9), and Bundler cannot
continue.
Make sure that `gem install mini_racer -v '0.1.9'` succeeds before bundling.

It ends with this:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test 
--without development' failed with return #<Process::Status: pid 282 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:108: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'"]}

Any ideas? My site is down at the moment, how can I get it back online?

What does it say before the “An error occurred” bit?

this omniauth error is the first one I see

0:  omniauth-oauth (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-oauth-1.1.0.gemspec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.9/ext/mini_racer_extension
/usr/local/bin/ruby -r ./siteconf20170328-282-11dr6pa.rb extconf.rb
checking for main() in -lpthread... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/var/www/discourse/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/mini_racer-0.1.9/mkmf.log

current directory:
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.9/ext/mini_racer_extension
make "DESTDIR=" clean

current directory:
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.9/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so

current directory:
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.9/ext/mini_racer_extension
make "DESTDIR=" install
/usr/bin/install -c -m 0755 mini_racer_extension.so ./.gem.20170328-282-incgx4
/usr/bin/install: error writing
'./.gem.20170328-282-incgx4/mini_racer_extension.so': No space left on device
Makefile:186: recipe for target 'install-so' failed
make: *** [install-so] Error 1

make install failed, exit code 2

Gem files will remain installed in
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.9 for
inspection.
Results logged to
/var/www/discourse/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/mini_racer-0.1.9/gem_make.out

  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:52:in `block in make'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:44:in `each'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:44:in `make'
/usr/local/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:61:in `block in
build'
  /usr/local/lib/ruby/2.3.0/tempfile.rb:295:in `open'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build'
/usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in
build_extension'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
/usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in
build_extension'
  /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
/usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in
build_extensions'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
  /usr/local/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
  /usr/local/lib/ruby/2.3.0/rubygems/installer.rb:748:in `build_extensions'
  /usr/local/lib/ruby/2.3.0/rubygems/installer.rb:297:in `install'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:145:in
`block in install'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/rubygems_integration.rb:187:in
`preserve_paths'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/source/rubygems.rb:135:in
`install'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/gem_installer.rb:55:in
`install'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/gem_installer.rb:15:in
`install_from_spec'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/parallel_installer.rb:114:in
`block in worker_pool'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:63:in
`apply_func'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:58:in
`block in process_queue'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:55:in
`loop'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:55:in
`process_queue'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:88:in
`block (2 levels) in create_threads'

An error occurred while installing mini_racer (0.1.9), and Bundler cannot
continue.
Make sure that `gem install mini_racer -v '0.1.9'` succeeds before bundling.

Did you follow this advice? What does that log say?

Can you please explain to me, how I can access that log-file. I’m new to docker, and the /var/www/-directory is created when rebuilding, right? Where can I find it?

You don’t even need to do that; the solution is right in the logs you quoted:

Your disk is full. Delete some stuff (probably start with a ./launcher cleanup and go from there) and everything will be much happier.