使用 apache 运行我的 Rails 应用程序时遇到分段错误 +乘客3.0.7
我的 Rails 应用程序与 apache +乘客在开始时工作得很好。然而,运行一段时间后,我遇到了以下错误:
The application spawner server exited unexpectedly: Unexpected end-of-file detected.
我检查了apache错误日志,发现了这个错误:
../gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:716: [BUG] Segmentation fault
似乎Passenger有内存问题。
有人可以帮忙吗?谢谢。
My rails app with apache + passenger works just fine at the beginning. However, after running for a while, I encountered following error:
The application spawner server exited unexpectedly: Unexpected end-of-file detected.
I checked the apache error log, found this error:
../gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:716: [BUG] Segmentation fault
Seems the Passenger has memory issue.
Anyone can help? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最可能的原因是乘客使用的 ruby 解释器版本存在错误。您可能想要升级乘客正在运行的 ruby 版本。如果您当前正在使用发行版提供的系统 ruby,您可能需要安装 rvm多用户模式,或 rbenv 使用更新版本。
The most likely cause is a bug in the version of the ruby interpreter that passenger is using. You may want to upgrade the version of ruby that passenger is running. If you're currently using the system ruby provided by your distro, you may want to install a rvm in multi-user mode, or rbenv to use a more recent version.
我曾经遇到过这个错误,Ruby 和 Passenger 的版本不同步。
我使用 RVM 来管理我的 Ruby 版本。我更新了 Ruby,但没有更新 Passenger。我必须更新/重新安装乘客,然后更新我的 Apache 配置以使用新的乘客 gem。
I once had this error where the versions of Ruby and Passenger were out of sync.
I use RVM to manage my Ruby versions. I had updated Ruby, but not passenger. I had to update / reinstall passenger and then update my Apache configuration to use the new passenger gem.
另外,你在哪个操作系统上运行这个?如果它是 Linux 发行版,我建议安装 rvm(apt-get 或 yum,具体取决于您的发行版)。然后升级到最新的 ruby(我假设您使用的是 1.9.3)。使用bundler来安装rails甚至乘客(推荐乘客版本4)。或者,您可以仅使用 gem install 安装乘客。
无论哪种方式,它都会安装一个脚本来为您配置 apache。同样,根据您的发行版,可以通过不同的方式进行设置。例如,您可以运行:rvmsudo Passenger-install-apache2-module。
Also, which OS are you running this on? If it's a linux distro, I'd recommend installing rvm (apt-get or yum depending on your distro). Then upgrade to the latest ruby (I'm assuming you're on 1.9.3). Use bundler to install rails and even passenger (would recommend version 4 of passenger). Or, you can install passenger just using gem install.
Either way, it will install a script to configure apache for you. Again, depending on your distro, this can be set up different ways. So, for example, you might run: rvmsudo passenger-install-apache2-module.
还有许多更新版本的乘客可用。我会升级 ruby 和乘客,看看是否可以解决问题;该问题很可能已在新版本中被发现并修复。
There are also much newer versions of passenger available. I would upgrade both ruby and passenger to see if that resolves it; most likely the issue has been found and fixed in newer versions.