Phusion passenger crash and restart rails application - ruby-on-rails

My website runs normally to me but CTR is very low so I open the error log and see something like from this file:
crash log
What is this and how can I fix this?
P/s: I'm using Phusion Passenger 4.0.10, nginx 1.0.15, rails 3.2.12, ruby 1.9.3p448, Centos

Related

Is it possible to run puma and passenger in a same nginx server

We have a production machine runs on Nginx + phusion passenger. Passenger is pointing to ruby verions 2.3. Want to deploy another application into the same server in which we require, ruby version 2.4+.
I believe, we cannot use that with the passenger any more as it is already pointing to a ruby version. So thinking to use puma for the other app with ruby version 2.4.
Is it possible to run puma and passenger in a same nginx server ?

Deploying Rails App on Elastic Beanstalk - Is WEBrick automatically replaced by passenger?

Quick Question:
I develop a ruby on rails application on my laptop. Rails has WEBrick installed as an out of the box APPLICATION server.
I deploy my app on amazon web services elastic beanstalk.
I choose The configuration: Ruby 2.2 with Passenger version 2.0.8, which contains:
64bit Amazon Linux 2015.09 v2.0.8 running Ruby 2.2 (Passenger Standalone)
Ruby 2.2.3
RubyGems 2.4.5.1
Passenger 4.0.59 - Application server
nginx 1.8.0 - Web server.
When I deploy my app, does elastic beanstalk automatically replace WEBrick with passenger??? Or-- do I need to install the passenger gem myself?
Thanks!
Figured it out. I used the AWS GUI console online to download the virtual server's instance logs. I checked the ed-activity.log file and saw that the server was started with passenger.
So, yes, Amazon Elastic Beanstalk automatically runs passenger even without the passenger gem in the gemfile.
Side note, when I tried to deploy the rails app with the passenger gem, I ran into a lot of problems. AWS EB runs passenger standalone 4.0.59 while HomeBrew installs passenger 5.0~something or other... This conflict will take down your entire server instance.

WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM - Rails - Apache2 - Passenger

I am deploying a Rails application on an ubuntu server that has Apache2 installed, Rails installed, and I am trying to get the application deployed using Passenger.
Apache is installed just fine - I can view static files, reload it, start it, stop it, etc..
Rails is installed just fine - I can run the WeBrick server from the application root.
Now I want to use passenger to deploy.
When I run the following command:
passenger-install-apache2-module
It goes through some stuff then the following error comes up:
WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM - Rails - Apache2 - Passenger
Basically, the Passenger installer tells me to recompile Apache with one of those MPM's or continue the installation process. I tried continue but it fails.
So, how do I got about fixing this issue?
You have two choices:
Fix Apache. How to fix this depends on how you installed Apache in the first place. If you installed Apache by installing it from source, then reinstall Apache by compiling it from source, but this time using the worker MPM. Refer to the Apache documentation to learn how to do that.
Don't use Apache. Instead, use Phusion Passenger + Nginx, or use Phusion Passenger Standalone.

Phusion Passenger is crashing...how can I get a stack trace?

I'm using Phusion Passenger 2.2.2 with a Rails 2.3.8 and 2.3.2 apps. Every once in awhile it will freeze and there is no response from the server when trying to access the rails applications. There is nothing in the apache log or the rails logs. I'm not talking about a 500 error or anything, there is just no response whatsoever. They don't respond until we restart apache.
I tried to follow these instructions to try to get a stack trace: http://www.modrails.com/documentation/Users%20guide%20Apache.html#debugging_frozen
I sent SIGABRT to the processes, according to the instructions, and they did not seem to care. Didn't see anything in the apache or rails logs.
The way to troubleshoot this problem on Passenger is to issue a kill -SIGABRT to the stuck Rails processes, and find their backtrace in the Rails log

Passenger & Rails refuse to start up in production environment

I have a production server that refuses to start up in the 'production' environment. it recently ran Rails 2.x and Passenger 1 (or 2 can't remember) just fine. Upgraded Rails & Passenger and now it starts up in the development environment even though Passenger docs say it should default to production. We haven't changed anything in its default setup.
Though I just tried adding RailsEnv production to the Virtual Hosts file...to no effect.
How can I troubleshoot this? The only output I see in the console is:
server:current elvis$ rails c
Loading development environment (Rails 3.0.3)
and trying to hit app with a web browser presents this dialog after a long delay (30+ secs)
Mac OS X Server 10.5.8
Rails 3.0.3
Passenger 3.0.0
MySQL: 5.0.82
Did you install Passenger to Nginx or Apache? You start the Rails app by running the webserver, not rails c. Nginx, for example, will then load the Passenger module which will run your Rails app as needed. So, startup Nginx or Apache and you should be good to go.

Resources