简体   繁体   English

在AWS opsworks上部署应用程序。 为什么部署randmomly失败?

[英]Deployment of Apps at AWS opsworks. Why deployment randmomly fails?

I have an AWS Opsworks Stack, and it has a Rails layer with many instances. 我有一个AWS Opsworks Stack,它有一个包含许多实例的Rails层。

When I deploy an app in general it works. 当我部署应用程序时,它的工作原理。 But sometimes the app returns a server error in some instances (500 error). 但有时应用程序在某些情况下会返回服务器错误(500错误)。 It is fixed by redeploying to the problematic instance. 通过重新部署到有问题的实例来修复它。

Is there a way to prevent this issues? 有没有办法防止这个问题? Why the same app works in some instances and not others? 为什么同一个应用程序在某些情况下有效,而在其他情 And why redeploying fixes the issue? 为什么重新部署修复了这个问题?

Thanks in advance 提前致谢

SOLUTION

  • Reducing nginx worker connections 减少nginx工作者连接
  • Or get an instance type with more memory. 或者获取具有更多内存的实例类型。
  • Rarely github checkout fails. 很少github结帐失败。 If this happens you just need to restart the instance and it usually solves the issue. 如果发生这种情况,您只需要重新启动实例,它通常可以解决问题。

Generally the deployment log will tell you what went wrong. 通常,部署日志会告诉您出了什么问题。

This does happen sometimes, and it is usually due to the SCM. 这有时会发生,通常是由于SCM。 In our case, randomly we'll get an error about github, and nothing would be checkout. 在我们的例子中,随机我们将得到一个关于github的错误,没有什么是结帐。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM