Capistrano的3财产:precompile需要时间。停在css文件 [英] Capistrano 3 assets:precompile takes hours. Stops at css file

查看:218
本文介绍了Capistrano的3财产:precompile需要时间。停在css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如它说,我不能让Capistrano的3做资产:正确precompile。即使下班后,还在说写入服务器上的的.css 文件。

Just as it says, I can't get capistrano 3 to do assets:precompile correctly. Even after hours, it still says writing to the .css file on the server.

更新:

我打得周围,我尝试了m1.medium。当它到了一个特定的点它只是停止了precompiling同样的事情发生了。没有错误抛出,光标只是闪烁。

I was playing around and I tried a m1.medium. Same thing happened when it got to a certain point it simply stopped precompiling. Not errors are thrown, the cursor simply flashes.

这看起来是仍在工作,因为它只是说:

It looks like it is still working, as it just says:

我,[2013-12-31T01:18:45.210416#31413]信息 - :写作/var/www/app/releases/20131231011622/public/assets/application-998b176a776d6aff56fce8af9ca0d861.css

I, [2013-12-31T01:18:45.210416 #31413] INFO -- : Writing /var/www/app/releases/20131231011622/public/assets/application-998b176a776d6aff56fce8af9ca0d861.css

当我看着从任何实例它看起来像这样的CPU使用情况:

When I look at the cpu usage from any instance It looks like this:

这似乎是这个过程完成,但事实并非如此。我创建从头假的应用程序,它完美地上传与同一Capistrano的设置。我现在用的CKEditor,引导,青菜和一个自定义的发动机,如果有差别。

It seems like the process is done, but it isn't. I created a fake application from scratch and it uploads perfectly with the same capistrano settings. I am using ckeditor, bootstrap-sass and a custom engine if that makes a difference.

如果我需要显示的任何其他文件,我会很乐意在这里添加。

If I need to show any other files I would be happy to add them here.

感谢

更新2 我得到它的工作在m1.medium实例,但它仍然无法上的m1.small或t1.micro实例。所以,我认为这是使用ssh。

Update 2 I got it to work on m1.medium instances, but it still fails on m1.small or t1.micro instances. So I assume it is with the ssh.

推荐答案

我也有类似的问题,即Capistrano的3冻结资产:precompile

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

对于我来说,原来,这是一个SSH问题,因为它需要precompile资产对生产时间的延长!特别是,如果服务器的内存和CPU的规格都不会太高。

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.

尽管我的连接到生产服务器是pretty的快速和可靠的,它似乎是我的SSH客户端便放弃了读书的SSHD服务器输出一定的时间之后。

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.

添加以下在/ etc / SSH / sshd_config中生产服务器上,以保持与连接SSH客户端还活着:

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

ClientAliveInterval 30
ClientAliveCountMax 10

这解决了该问题,现在Capistrano的3完成部署,没有任何问题。

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

这篇关于Capistrano的3财产:precompile需要时间。停在css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆