我对乘客有误。
我在VPS中设置了redmine。当我在 webrick 中运行时,它运行正常。我曾经乘客在 80 端口运行 redmine。
路径:usr/local/apache/conf/httpd.conf
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRuby /usr/bin/ruby
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17
PassengerMaxPoolSize 2
PassengerMaxInstancesPerApp 2
PassengerPoolIdleTime 100
<VirtualHost 112.78.6.191:80>
ServerName projects.gzerone.com
ServerAlias www.projects.gzerone.com
DocumentRoot /home/gzerone/public_html/redmine-2.1.2/public
RailsEnv production
#ErrorLog /usr/local/apache/logs/redmine.error.log
#RackBaseURI /rails
ServerAdmin webmaster@projects.gzerone.com
#UseCanonicalName Off
#CustomLog /usr/local/apache/domlogs/projects.gzerone.com combined
#CustomLog /usr/local/apache/domlogs/projects.gzerone.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User gzerone # Needed for Cpanel::ApacheConf
<Directory /home/gzerone/public_html/redmine-2.1.2/public>
#AllowOverride all
Allow from all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
<IfModule mod_suphp.c>
suPHP_UserGroup gzerone gzerone
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup gzerone gzerone
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RUidGid gzerone gzerone
</IfModule>
ScriptAlias /cgi-bin/ /home/gzerone/public_html/redmine-2.1.2/public/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/gzerone/projects.gzerone.com/*.conf"
在 apache 的 error_log 中:
[ pid=23984 thr=23634338875820 file=utils.rb:176 time=2012-11-23 10:39:34.067 ]: *** Exception Errno::ENOMEM in PhusionPassenger::Rack::ApplicationSpawner (Cannot allocate memory - fork(2)) (process 23984, thread #<Thread:0x2afd98bf1358>):
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:462:in `fork'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb:462:in `safe_fork'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:180:in `start'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.17/helper-scripts/passenger-spawn-server:99
我希望。你提出任何修复它的建议。