Capistrano 3 assets:precompile takes hours. Stops at css file

坚强是说给别人听的谎言 提交于 2019-12-01 16:41:36
moeabdol

I had a similar issue where Capistrano 3 freezes on assets:precompile.

For me it turned out that it was an SSH problem due to the prolonged time it takes to precompile assets on production! Especially if the server memory and CPU specs are not too high.

Although my connection to the production server was pretty fast and reliable, it seemed that my SSH client just gave up reading output from SSHD server after a certain amount of time.

The Fix

Add the following in /etc/ssh/sshd_config on production server to keep connection with SSH client alive:

ClientAliveInterval 30
ClientAliveCountMax 10

This fixed the issue and now Capistrano 3 completes deployment with no problems.

  1. Is this a Windows instance? Windows instances by default use the IE6 Javascript/CSS engine which is PATHETICALLY SLOW and accurately reflects the problem that you are facing.

  2. If it is a Linux instance, try adding the uglifier and therubyracer gems in your Gemfile, and also make sure to install Firefox/libv8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!