passenger

Passenger hosted Rails app *painfully* slow, but the server is a beast

↘锁芯ラ 提交于 2019-11-29 21:07:22
I have been working to deploy a relatively large Rails app (Rails 2.3.5) and recently doing some load testing we discovered that the throughput for the site is way below the expected level of traffic. We were running on a standard 32bit server, 3GB of RAM with Centos, and we were running Ruby Enterprise Edition (latest build), Passenger (Latest build) and Nginx (Latest build) - when there is only one or two users the site runs fine (as you would expect) however when we try to ramp up the load to ~50 concurrent requests it completely dies. (Apache Bench report ~2.3 req/sec, which is terrible )

Why should I care about RVM's Gemset feature when I use Bundler?

倖福魔咒の 提交于 2019-11-29 21:00:54
I just don't get it. I thought, Bundler was developed to resolve version conflicts between gems. So that I just have to require "bundler/setup" and everything is fine, knowing that Bundler will load the correct versions of all my gems and their dependencies. Now, RVM is great for managing multiple Rubies, I know, but why should I care about the Gemset feature? Do I miss something here? Can it make my development even easier? Maybe, some of you can give me some hints on the perfect RVM + Bundler workflow for both, development and production. I also don't know when RVM starts switching to

What is optimal value for Phusion passenger PassengerMaxRequestQueueSize

随声附和 提交于 2019-11-29 20:22:05
I know this depends on the box hardware, but for example if there are set 100 processes, the default queue is also 100. Does it makes sense to increase PassengerMaxRequestQueueSize to 200 or 300? Probably this depends on free memory. Thoughts? The best answer will be explaining the setting and probably one or two examples, assuming the server process requests for 2-3 seconds. Thanks in advance! Hongli Why you should limit queuing Any requests that aren't immediately handled by an application process, are queued. Queuing is usually is bad: it often means that your server cannot handle the

Rails on Passenger not recognizing RVM

狂风中的少年 提交于 2019-11-29 19:55:32
I have shifted to ree using rvm by: rvm use ree@mygemset and installed kaminari gem through Gemfile and bundle install. But Phusion passenger seems to still look for the gem in system default directory. It says: Error message: Could not find kaminari-0.10.4 in any of the sources (Bundler::GemNotFound) What do I missing? Rails need any specific configuration to recognize the current ruby version and gemset I am using?? Michelle Tilley You need to instruct Passenger to load RVM and then setup the environment for your gemset. The easiest way to go about this involves three steps: Create a .rvmrc

Is it possible to change Passenger Ruby version without recompiling?

只谈情不闲聊 提交于 2019-11-29 17:47:05
问题 I tried changing the default ruby command to 1.9.2 but Passenger keeps running 1.8.7 Is Passenger compiled with Ruby embedded? 回答1: To set the Ruby version add this line to your vhost file: PassengerRuby /path/to/the/ruby/version/you/want/to/use 回答2: Whenever a "bundle update" updates the version of the passenger gem, I do sudo su - passenger-install-apache2-module At the end of that process, it spits out the full blob of stuff that you need to put at the top or your Apache config. E.g.

Errno::ECONNRESET: Connection reset by peer in Rails using rest-client

倾然丶 夕夏残阳落幕 提交于 2019-11-29 15:21:10
We have a Ruby on Rails application and this has a "search" functionality (search for some company). From browser user key-in some name and hit search and this search make an rest api call to outside system and get us some search results. We are using " rest-client " (for Ruby on Rails). I noticed this seems to work for few hours and suddenly my search seems to be broken all of a sudden and I can see in my log I get: Errno::ECONNRESET: Connection reset by peer We tried to investigate this issue by looking in to logs and we dont see any logs. If we need to make this search work again we need to

How to use different rails_env with nginx, passenger and redmine

梦想的初衷 提交于 2019-11-29 15:20:35
I need to have redmine running in combination with nginx, phusion passenger and mysql. Because of the project requires several instances of redmine, which should be realized using different rails_env, I tried to set them in the different server vhosts with nginx. Example of one vhost: server { listen xxxx; server_name redmine.xxxxx; root /xxxxx/redmine/public; passenger_enabled on; rails_env production; } Same goes for the other server vhost, but there server_name is matched to the other domain and rails_env set to internal. The problem is, that nginx just uses one of both rails_env for both

Phusion passenger-status: what value for passenger_instance_registry_dir?

夙愿已清 提交于 2019-11-29 11:57:53
问题 I've done a new install of nginx 1.6.3 and passenger 5.0.15 on Ubuntu 14.04 from source in order to add tracing components from AppNeta for my ROR 4.2 app on one of my servers. Nginx and passenger are running and serving pages. I am getting the trace data for server monitoring. All seems well, However, when I run "passenger-status" (as root), I get the following: ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it is running, then the causes of this problem could be:

Passenger on Windows

点点圈 提交于 2019-11-29 09:18:57
Is there any way to get Passenger running on a Windows machine? It doesn't appear so, but it seems like many Stackoverflow'ers have used Passenger a lot and I was wondering if its possible . Sam Saffron Hongli (the author) said in 2008 : Hi Mitja. We have no plans to port Passenger on Windows. Windows lacks the proper facilities to implement Passenger efficiently. Passenger on Windows will be very, very inefficient, which can give both Ruby on Rails as well as Passenger a bad name. So to me it looks like your out of luck here. Just run a VM and do your Rails work on it. Ruby/Rails is painfully

I have to restart Apache every time I change my Rails code

给你一囗甜甜゛ 提交于 2019-11-29 08:33:00
问题 I'm running Rails 3 with Apache and Passenger. Ever since I switched from Mongrel to Passenger I find that I have to restart Apache every single time I change my code. Is this the intended behavior? Is the only way to avoid this problem to use Mongrel in development? 回答1: Assuming you have to restart Apache even for model/view/controller code, it would seem as if you've set up Passenger to run your app in the production environment. You can fix this by appending RailsEnv development to your