【问题标题】:Setting auto_flushing=1 in production mode在生产模式下设置 auto_flushing=1
【发布时间】:2012-01-08 16:30:57
【问题描述】:

我们的应用程序有两个生产环境。一种叫做“生产”。其他被称为“英国”。我们在英国环境中看到内存泄漏,因此我们需要每周重新启动服务器。我们发现的一件事是 auto_flushing 在英国环境中设置为 1,而在生产环境中设置为 1000。该文档说,减少刷新频率会增加内存使用量。是否有可能更频繁地刷新会导致内存问题?

【问题讨论】:

    标签: ruby-on-rails configuration production


    【解决方案1】:

    没有 auto_flushing 实际上使用更少的内存,但更多的 IO 负载(可能会更慢)。

    但我猜在 Rails 3.1 中这已被弃用,并且此设置被忽略。

    https://github.com/rails/rails/blob/c9cd0eb2d01c262b987070d739cf1d5e46672c10/activesupport/lib/active_support/buffered_logger.rb#L107

    【讨论】:

      猜你喜欢
      • 2021-07-16
      • 2014-05-07
      • 2016-12-21
      • 1970-01-01
      • 2021-12-13
      • 1970-01-01
      • 1970-01-01
      • 2021-12-04
      • 2020-01-24
      相关资源
      最近更新 更多