简体   繁体   English

mod-rails / aphusion在Apache上的乘客:真的很慢

[英]mod-rails / phusion passenger on apache: Really slow

I installed redmine on the apache and used mod_ruby first, which was incredible slow... now i switched to phusion passenger but the response time is still really slow ( talking about 5-6 seconds here, even using a wget to localhost from the server itself.. ) 我在Apache上安装了Redmine并首先使用了mod_ruby,这真是令人难以置信的缓慢...现在我切换到了phusion乘客,但是响应时间仍然非常慢(这里大约是5-6秒,即使使用从服务器到本地主机的wget本身..)

i just removed the "old" mods from the apache dir, but it's still slow... anyway, the logfile at least shows, that the passenger is used: 我刚刚从apache目录中删除了“旧” mod,但是它仍然很慢...无论如何,日志文件至少表明使用了乘客:

127.0.0.1 - - [15/Nov/2009:10:38:25 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9
(Debian) Phusion_Passenger/2.2.5 PHP/5.2.6-1+lenny3 with Suhosin-Patch mod_ssl/2.2.9 
OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0 (internal dummy connection)"

I have no idea why this happens, the server should be fast enough.. apache-log isn't showing anything suspicious.. 我不知道为什么会这样,服务器应该足够快.. apache-log没有显示任何可疑的消息。

EDIT: 编辑:

Thanks for the hint.. The "passenger-status" is "empty": 感谢您的提示。“乘客状态”为“空”:

----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

Any advice? 有什么建议吗? Thanks! 谢谢!

Try increasing the PoolIdleTime setting (which is 2 Minutes by default I think). 尝试增加PoolIdleTime设置(我认为默认为2分钟)。 Setting it to 0 helped speed the startup of my Redmine stack a lot. 将其设置为0有助于大大加快Redmine堆栈的启动速度。 Check out this question on Serverfault on which values to set. 在Serverfault上检查该问题,以设置哪些值。

You can use the config option PassengerMinInstances, avaliable since Passenger 3.0.0. 您可以使用配置选项PassengerMinInstances,自乘客3.0.0起可用。 This setting allows you to tell Apache how many instances of your deployment must stay alive, even when your applications have been idle for a logner period than the defined by PoolIdleTime. 此设置使您可以告诉Apache必须保持多少个部署实例处于活动状态,即使您的应用程序在闲置时间超过了PoolIdleTime定义的记录器时间之后也是如此。 Have a look at the Phusion Passenger docs . 看一下Phusion Passenger文档 There are some otrher usefull options to improve your deoployment's performance. 有一些其他有用的选项可以提高您的部署绩效。

This answer may be a bit outdated --I'm quite sure almost everyone know the new features of Passenger, but I wasn't, and this question helped a lot. 这个答案可能有点过时了-我很确定几乎每个人都知道Passenger的新功能,但是我不是,这个问题很有帮助。

I found a tool ( http://www.wekkars.com ) that keeps my application alive. 我找到了一个使我的应用程序保持活动状态的工具( http://www.wekkars.com )。 I just updated the PoolIdleTime to 30 minutes and the tool does the rest... 我刚刚将PoolIdleTime更新为30分钟,其余时间则由该工具完成...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM