我有一个运行在Apache / Passenger下的适度复杂的Rails应用程序,闲置一段时间后变得没有响应。 这需要几分钟的时间来响应,但可以通过重新启动Web服务器暂时恢复。 服务器负载是微不足道的,因为它是一个内部应用程序,很less有并发用户。 我也试过nginx,所以这不是Apache导致的问题。 Apache或Rails日志中没有任何有用的东西。 根据Passenger文档,我发送了一个SIGABRT并且有一个堆栈跟踪(在下面)。 它的数据库不是重载,我试过禁用任何可能导致locking的后台处理。 SignalException(SIGABRT): 乘客(3.0.17)lib / phusion_passenger / abstract_request_handler.rb:443:在`block in install_useful_signal_handlers' activerecord(3.2.8)lib / active_record / connection_adapters / mysql2_adapter.rb:73:在`call' activerecord(3.2.8)lib / active_record / connection_adapters / mysql2_adapter.rb:73:在'ping' activerecord(3.2.8)lib / active_record / connection_adapters / mysql2_adapter.rb:73:在`active?' activerecord(3.2.8)lib / active_record / connection_adapters / abstract_adapter.rb:219:在`verify!'中 activerecord(3.2.8)lib / active_record / connection_adapters / abstract / connection_pool.rb:327:in`block in […]
当用户上传时/tmp/stream*文件在上传过程中被创build。 我该如何更改临时上传目录: /tmp 至: /home/user/tmp 运行: nginx 0.8.53 Phusion Passenger 2.2.15(mod_rails / mod_rack) Debian Lenny
我遇到了一个服务器错误,它告诉我,它不能检测到耙子等重要的gem。 研究表明,Phusion Passenger和RVM之间存在一个错误的交stream。 RVM build议在服务器的全局configuration文件中设置PassengerDefaultRuby ,在我的情况下是/etc/apache2/apache2.conf 。 当我插入这一行: PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby 重新启动Apache时出现此错误: Syntax error on line 39 of /etc/apache2/apache2.conf: Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration 也许我把这个代码放在错误的文件中? 或者也许别的东西出了问题? 任何指导将不胜感激。
我的服务器是: Server version: Apache/2.2.11 (Ubuntu) Server built: Aug 16 2010 17:44:11 我的ruby版本ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] 。 我已经通过RubyGems安装passenger 3.0.7 。 我已经运行passenger-install-apache2-module ,一切都很好。 我修改了configuration(加载模块,编辑虚拟主机等),并重新启动Apache。 模块加载正常(Apache不抱怨)。 但乘客显然不工作: sudo passenger-status ERROR: Phusion Passenger doesn't seem to be running. 我怎样才能使它工作? 编辑1: /etc/apache2/mods-enabled/passenger.load LoadModule passenger_module /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/ext/apache2/mod_passenger.so 乘客的根源: passenger-config –root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.7 / etc / apache2 / sites-enabled / railsapps中的 Apache […]
我正在通过Apache Passenger运行一个新的Rails 3应用程序,并试图在stage环境中运行它。 根据文档以及之前的Apache Passenger应用程序,我的configuration文件已经正确设置,但是我无法让它在合适的环境下运行,即使我在我的VirtualHostconfiguration中指定了它,如下所示: RailsEnv stage 有什么build议么? 注意:如果有问题,我使用Ruby 1.9.2-p0
我有一个使用Apache 2和Phusion Passenger的Rails应用程序。 作为一个安全措施,我试图抑制所有服务器相关的HTTP头。 我已经成功地closures了Apache的,但是我在使用mod_headers Passenger时遇到了麻烦。 我已经使用a2enmod命令启用了a2enmod并重新启动了Apache进程,但X-Powered-By和X-Runtime头仍然出现。 这是我的虚拟主机文件: <VirtualHost *:80> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot /home/deploy/public_html/railsapp/current/public LogLevel warn ErrorLog /home/deploy/public_html/railsapp/shared/log/error.log CustomLog /home/deploy/public_html/railsapp/shared/log/access.log combined # Suppress Phusion Passenger HTTP headers <Location *> <IfModule mod_headers.c> Header unset X-Runtime Header unset X-Powered-By </IfModule> </Location> </VirtualHost> 我究竟做错了什么?
我正在使用puppet install中提供的标准auth.conf作为在Nginx下通过乘客运行的puppet master。 但是,对于大部分的目录,文件和certitifcate请求,我得到一个403响应。 ### Authenticated paths – these apply only when the client ### has a valid certificate and is thus authenticated # allow nodes to retrieve their own catalog path ~ ^/catalog/([^/]+)$ method find allow $1 # allow nodes to retrieve their own node definition path ~ ^/node/([^/]+)$ method find allow $1 # […]
我使用Nginx和Passenger作为我的Rails应用程序。 我想使用代理caching来caching我的网页。 但是,每个请求都直接导入到我的rails应用程序中。 我不知道我的configuration有什么问题。 以下是我的configuration: user www-data; worker_processes 1; events { worker_connections 1024; } http { passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15; passenger_ruby /usr/bin/ruby1.8; passenger_max_pool_size 6; passenger_max_instances_per_app 1; passenger_pool_idle_time 0; rails_spawn_method conservative; include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 512; sendfile on; #tcp_nopush on; keepalive_timeout 65; tcp_nodelay on; gzip on; gzip_http_version 1.0; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types text/plain text/css […]
我有需要部署Rails 3应用程序,使用RVM和gemsets,并期待“公共”的stream量(即这不是一个只有内部的应用程序)。 我也必须使用Apache作为我的应用程序的公共接口。 我知道Passenger Standalone可以帮助完成rails / RVM的terminal,而且我已经成功地将其设置在我的开发环境中。 我的问题是这个设置是如何可行的生产部署。 是通过configuration为ReverseProxy Apache部署到我的乘客驱动的Rails应用程序会产生问题吗? 由于我正在devise生产部署,所以我想了解是否应该花费额外的时间来设置Passenger连接到Apache,并让 Passenger与运行我的Rails应用程序的Passenger Standalone实例通信。 所以,我正在寻找一个我猜想三个答案: 阿帕奇反向代客户独立将通常很好 你不应该使用Apache / Passenger Standaloneconfiguration,而是在Apache端设置Passenger 您的整个设置是错误的,请RTFM(并包括链接到“FM”)
我有一个在Passenger 3.0.9下使用Rails 3.1运行nginx 1.0.5的临时服务器。 问题是,在发生应用程序错误的地方发送一个请求后,返回502 Bad Gateway 。 为了testing它,我设置了一个简单的控制器,其中一个动作就是引发一个虚拟的exception。 一个请求将显示Rails错误消息,下一个将显示nginx 502 Bad Gateway错误,然后返回到Rails应用程序错误等。 在调查这个问题时,我发现负载testing应用程序(增加了应用程序的数量)使得这个问题消失了。 这是直到额外的进程closures,然后重新出现。 我已经尝试设置passenger_min_instances选项,但这样做不会改变任何东西,并在这种情况下,每次发生应用程序错误时,一个实例被终止,而负载testing后,所有实例保持活着。 PS:我的团队中的一些人告诉我,他们已经看到了502错误,即使没有应用程序错误,但我还没有能够重现这一点。 更新 :刚刚发现如何显示使用ab的响应状态代码,其中大部分是502!