Redmine性能不一致

发布于 2024-12-17 18:45:36 字数 329 浏览 5 评论 0原文

我在 Linux x86_64 系统上部署了一个 redmine 实例,但我正在努力解决一个有趣的性能不一致问题。它的行为是这样的:

将其单独放置几个小时(根本没有向应用程序发出任何请求),然后建立连接,需要很长时间才能响应前几个请求(可能长达 15 秒以上,有时每个大约 1 分钟响应)。在最初的几个请求之后,它的性能非常快,几乎是立即的,我从日志中可以看到,响应时间不到 100 毫秒。

我尝试了几种使用 mongrel 运行它的选项,并将其部署在乘客 Nginx 和乘客 Apache 上。该行为可以简单地重现。我测试发现,在繁忙的情况下,完全不会有问题。

这是怎么回事?我该如何改进这个?

I have a redmine instance deployed on a Linux x86_64 system and I am struggle with a funny performance inconsistency issue. It behave like this:

Leave it alone for a couple of hours (no request to the application at all) then establish a connection, it takes a very long time to response to the first few requests (can be as bad as 15 seconds+, sometimes every for response at about 1 minute). After the first few requests, it performance very quickly, almost instantly where I can see from the log that it takes less than 100ms to response.

I have tried a couple of options to run it using mongrel, deployed it on passenger-Nginx, and on passenger-Apache. The behaviour simply reproduceable. I realised from the testing when it is keeping busy, there will be no problem at all.

What is it all about? How can I improve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

套路撩心 2024-12-24 18:45:36

该问题很可能是由乘客池闲置引起的。您可以将 PassengePoolIdleTime 增加到更大的数字,或者如果您根本不希望它超时,则将该值设置为 0。类似下面的 Apache 配置应该可以解决问题

<VirtualHost *:80>
    DocumentRoot /path/to/redmine/site/public
    ServerName example.com
    PassengerPoolIdleTime 0
        <Directory "/path/to/redmine/site/public">
                PassengerEnabled on
                AllowOverride
                Options -MultiViews
        </Directory>
</VirtualHost>

The issue is most likely caused by the the Passenger pool idleling out. You can either increase the PassengePoolIdleTime to a larger number, or if you don't wan it to time out at all set the value to 0. An Apache config something like below should fix the issues

<VirtualHost *:80>
    DocumentRoot /path/to/redmine/site/public
    ServerName example.com
    PassengerPoolIdleTime 0
        <Directory "/path/to/redmine/site/public">
                PassengerEnabled on
                AllowOverride
                Options -MultiViews
        </Directory>
</VirtualHost>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文