Redmine在Linux上开始变慢

时间:2013-10-07 12:02:38

标签: ruby linux passenger redmine

如何让Redmine在Linux(CentOS)上快速启动?

我上周升级了所有人:最新的Redmine,Ruby,Passenger等......

我尝试了在Redmine论坛上发现的所有内容以及让它加快速度的其他帖子,即:在闲置几个小时后请求Redmine网站时,它开始变慢,但随后它开始变得非常快。

我正在使用带有Passenger的Apache Web服务器。在我当前的apache配置下面,请一些建议,因为我没有想法:

LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.19
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3-p448/ruby

# Refs:
# http://stackoverflow.com/questions/8235309/redmine-perfomance-inconsistency
# http://www.redmine.org/boards/2/topics/31783
# This option should be 0, but has an issue: https://code.google.com/p/phusion-passenger/issues/detail?id=904
PassengerPoolIdleTime 999999
PassengerMinInstances 2
PassengerHighPerformance on
PassengerPreStart https://myhost/redmine

PassengerMaxPoolSize 5
PassengerMaxInstancesPerApp 4
PassengerStatThrottleRate 10
RailsAppSpawnerIdleTime 0
PassengerMaxPreloaderIdleTime 0

RailsBaseURI /redmine
RailsEnv production

1 个答案:

答案 0 :(得分:2)

我通过设置一个cron作业来解决这个问题,每隔15分钟请求redmine主页:

*/15 * * * * /usr/bin/curl http://redmine_server/ --stderr - > /dev/null