phusion-passenger

Passenger spawning new ruby instances on Ajax calls

I have some heavy perfomance issues with Passenger and ajax calls. It seems like every time I do an ajax call, a new ruby instance is started instead of using the one that responded to the original page request, making it really slow. The fact that multiple ajax requests can be made in just a few seconds doesn't make the situation better...

Phusion Passenger Not always NonBlocking with Rails?

How does Passenger decide when to fork a new process, and can I configure in any meaningful way how many proccesses it should handle (other than "smart" and "conservative" flags in the configuration?) Alternatively, is there any way to debug why a rails app running under Phusion would suddenly freeze up? Background: I'm using Phusion ...

host both test and development for the same app in Phusion Passenger

Hi, I use passenger with nginx. I have multiple apps and they talk to each other. I configure the passenger to host these same apps in both test and dev environments. Now the problem is sometimes when I go to the dev environment on app1, and the app1 talks to the app2, but it hit the app2's test url. If I use mongrel no such proble...

Rails App Maintenence Without Hindering Visitors

A Phusion Passenger error message isn't what I want my visitors to see if they landed on my site while I'm updating the back end. So how do I get around this? Is my deployment process flawed from the start? or is there something I'm missing out? Here's my process of deployment, so you get the picture: commit new updates to a git rep...

gitsosis, redmine, passenger: 'not a git repository' error

I installed gitosis and redmine and am running it through apache/passenger on CentOS. The problem is I cannot access the repositories through redmine. The error being "The entry or revision was not found in the repository. My repository is stored at /home/zenna/repositories/myproject.git The error (found in the apache logs) is "fata...

How can I secure my OAUTH secret in Phusion Passenger Sinatra app?

I have an app that uses a single-user OAUTH token. I can store the four values (consumer key/secret, token/secret) directly inside the app but that's not recommended and I don't want the secrets to be checked into source code. The app doesn't use a database. I know that however I store them, someone with access to the server could figure...

Installed Phusion Passenger on Server but apache2 didn't install in /etc/apache2/

Hey all, I am following instructions on how to deploy rails application on server. I did the following: sudo gem install passenger passenger-install-apache2-module Everything is successful so far. But next on instruction he uses: nano /etc/apache2/sites-enabled/000-default Problem is there is no apache2 directory in etc. Theref...

Rails logging error: "Error during failsafe response: Shifting failed." ... is there an elegant solution to this?

I've configured my Rails 2.3.8 logger in the environment.rb to rotate daily: config.logger = Logger.new("#{RAILS_ROOT}/logs/#{RAILS_ENV}.log", 'daily') and every day in the morning I get the usual: Error during failsafe response: Shifting failed. Is there a decent/elegant/better solution to this? What I've done in the past is just...

Phusion Passenger spawning problems

I am working with a Rails 3RC app and using Phusion Passenger for the first time. It takes about 30 seconds to start up the app on the first request and here is the typical memory consumption for each ruby process in my app: PID     VMSize     Private   Name 18161 263.5 MB 75.4 MB Rack: /rails_apps/my_app/current Is that typical...

Error in a rails app under apache and Phussion Passenger

Hi. I've a rails app with Oracle, Apache, and Phussion Passenger over Centos. The apps works randomly, and constantly appears this error "You don’t have permission to access / on this server." Any clue? Anyone has had the same problem? Thanks in advance ...

ssl in localhost using apache and passenger

Hi, I am trying to configure SSL on my localhost using apache and phusion passenger. I am using virtualhosts. I have the below configuration in sites-available/myapp VirtualHost *:80 ServerName myapp DocumentRoot /home/madhu/ror/myapp/public RailsEnv development Directory /home/madhu/ror/myapp/public AllowOverride all ...

How to serve RoR JS/CSS out of nginx passenger sub_uri?

Here is my config: user nobody nobody; worker_processes 2; error_log /rails/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15; passenger_ruby /usr/loca...

How to install Passenger when using RVM?

I'm using RVM and would like to install Phusion Passenger on Snow Leopard. After installing the Passenger gem (version 2.2.15) I try run the Apache module installer script passenger-install-apache2-module. But it compains that it can't find rake: ... * RubyGems... found * Rake... not found * rack... found ... There is alrea...

Rails app running under Phusion Passenger shows only a white screen

I had posted another question earlier about deployment with Passenger. That problem turned out to be a permissions issue, and I fixed it by running chmod on the www folder recursively. Now, I don't get the Phusion error page, but I get a white screen of death. The Rails logs show no error messages, and I cannot figure out what is going...

When running phusion, do you tell it how much memory you want to allocate to each instance?

When I read that people run phusion as the web server, and they allocate x amounts of ram per instance, what does this mean? Instance of what? Isn't phusion the web server? Or are they running x instances of phusion, each on their own ports and round-robinning? ...

Odd restarts on specific passenger processes

I've recently been working with our passenger setup and monitoring our app via NewRelic's RPM. As of the last week I've noticed that the production version of our app restarts about once an hour (doesn't track to exactly once an hour, it's seemingly random, and only happens during the day that I can tell - though there are seldom request...

How can I run something in a thread with passenger?

Hello, I'm using Phusion Passenger with my nginx to deploy rails/sinatra applications, and I'm currently having a problem. I want to run a class that checks for new submissions to reddit.com every 30 seconds. But since passenger shuts down the application after x seconds of idle time, it won't keep checking. Yes, I've tried to set pass...

Phusion Passenger Configuration via .htaccess

I'm trying to install Redmine, and I am having trouble making Phusion Passenger work with any directories other than the DocumentRoot. I've put the public directory downloaded from Redmine into ~/www/public/entry/redmine.mysite.com/, and the rest of the directories in ~/www/app/redmine.mysite.com/. I've added the following line to the ...

Running phusion with nginx, how will pointing to public folder make this work?

Confused here, how will pointing nginx to the /public folder make a RoR application run? The public folder doesn't have any of the .rb files in it? Does it somehow access the folders below? ...

How can I selectively clear the cache for Sinatra + Nginx + Phusion Passenger?

I have a modular Sinatra app running on nginx with Phusion Passenger. When I alter my app (and in particular, some YAML files which are used to generate pages), I'd like to be able to clear only the parts of my cache that are affected (and leave evertyhing else in /public alone--I know I can just clean out the whole cache, but I was hop...