Encountered segmentation fault when running my rails app with apache + passenger 3.0.7
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 detec开发者_开发知识库ted.
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.
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.
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.
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.
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.
精彩评论