我的动力客车的Rails应用程序有时需要很长的时间来加载 [英] My passenger powered Rails app sometimes needs a long time to load

查看:102
本文介绍了我的动力客车的Rails应用程序有时需要很长的时间来加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache +乘客举办一些Rails应用程序。东西好像在睡眠模式去时有更长的时间内没有请求。然后,它需要10-20秒加载此站点。感觉好像有东西,有醒来的时候已经出现了较长时间的请求。

I use Apache + Passenger to host some Rails applications. Something seems to go in a sleep mode when there is no request for a longer time. It then takes 10-20 seconds for the site to load. Feels like there is something that has to wake up when there have been no requests for a longer time.

我该如何解决呢?我有足够的RAM,这样它应该是什么,如果进入睡眠状态只是停留醒没问题。 ;)

How can I fix that? I have enough RAM so it should be no problem if whatever goes to sleep just stays awake. ;)

推荐答案

看看乘客的 PassengerPoolIdleTime 参数。
它指出秒钟一个应用程序实例可以处于空闲状态它关闭以节省内存之前的最大数量。

Take a look at the PassengerPoolIdleTime parameter for Passenger. It states the maximum number of seconds an application instance can be idle before it shuts down to conserve memory.

默认值是300,但你可以尝试设置一个较大的数字,看看是否有帮助。

The default is 300, but you could try to set a higher number and see if that helps.

这篇关于我的动力客车的Rails应用程序有时需要很长的时间来加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆