Can't rebuild. Freezes midway through


(Bruno) #1

I’m trying to rebuild my app to install a new plugin and it always stops in the same command:

I, [2017-05-17T13:37:38.472006 #13]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development'

It freezes right there and simply does not continue. Doesn’t give any error or warnings at all. Just freezes.

I’ve already restarted the server with sudo shutdown -r now and then rebuild but still no go.

Any suggestions?

It’s a Digital Ocean install with Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-77-generic x86_64)

Let me know! Thanks!


(Bruno) #2

Found here:

In the end that message came through. So that’s probably it. Will try it now on a different connection

Any suggestions on how to solve that?

I’ve asked my server guy to rebuild through his connection. But I have no idea why on mine gives that message. My connection is not that unstable, so not sure


(Régis Hanol) #3

bundle install is the slowest part of the rebuild process. It can take between a couple of minutes to 1 hour depending on your CPU and connection speeds.

If you lose the SSH connection during the rebuild, then the process will be killed and the rebuild stopped.

You should run the rebuild from inside a session of screen or tmux in order to ensure the rebuild keeps working even if you disconnect.


(Sam Saffron) #4

@Falco I wonder if it is worth amending launcher so it supports a different default image for beta/latest vs stable.

Then at least we can hardcode the new image in for all beta/latest users and avoid the brutal bundle install time people are now seeing.


(Bruno) #5

Thanks for the tip, appreciated.

Yeah, my server guy ran on his server and he has a stabler connection (down here in Brazil sometimes it’s pretty rough) and then it went just fine. Like ~10mins to finish the whole rebuild.

So the problem really was in my connection.

I’ll try that next time. Thanks!

BTW, do screen or tmux has a Mac version? Or do you know any other app I could use for Mac?


(David Taylor) #6

If you want to use screen to avoid rebuild issues due to your internet connection, you need to first SSH into the server as normal, then run screen. That way, if your network connection fails and the SSH connection is dropped, the rebuild will continue running on the server.

Tl;dr, screen needs to be installed on the Linux server, not your mac


(Bruno) #7

Ohhh I see. Goes to show how much I understand this stuff lol :wink: Thanks!


(Jay Pfaffman) #8

The other non-obvious thing is that if you disconnect, when you log in again (using tmux) you issue a tmux attach to reconnect to your old session.

Figuring out the analogous command for screen is left as an exercise for the reader.


(Felix Freiberger) #9

Bonus tip for tmux users: If you configure your SSH client to automatically run tmux new-session -A -s main when you connect, this means that you will always be reconnected automatically: This command either creates a new session or attaches to an already existing one :slight_smile:

(This requires a fairly recent version of tmux. For screen users, something similar is possible by passing lots of r and R switches to screen ;-))


(Jay Pfaffman) #10

Aha! I looked feverishly for such an option not too long ago. It would be very handy for my install script to be able to crank up the install in tmux.

I’ll be checking this out ASAP. Thanks, @fefrei!