Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-325

add setting to flush jruby instances after a configurable number of requests



    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • SERVER 1.1.0, SERVER 2.1.0
    • None
    • None
    • 5
    • Server 2015-02-04, Server Jade 2015-04-15, Server Jade 2015-03-04, Server Jade 2015-03-18, Server Jade 2015-04-29, Server Jade 2015-05-13
    • Major


      This ticket would introduce a new configurable setting to the JRubyPuppet section of Puppet Server - max-requests-per-instance. A basic description follows:

      max-requests-per-instance: Optionally, limit how many HTTP requests a given JRuby instance will handle in its lifetime. When a JRuby instance reaches this limit, it gets flushed from memory and replaced with a fresh one. Defaults to 0, which disables automatic JRuby flushing. This can be useful for working around buggy module code that would otherwise cause memory leaks, but it causes a slight performance penalty whenever a new JRuby has to reload all of the Puppet Ruby code. If memory leaks from module code are not an issue in your deployment, the default value will give the best performance.

      One other more subtle change with the implementation is that the JRubyPuppet pool changes from a FIFO (First-In / First-Out) to a LIFO (Last-In / First-Out) algorithm for how pool instances are borrowed from and returned to the pool as requests are handled. This was done in order to avoid having instances running at about the same number of requests handled at all times and, therefore, otherwise incurring a heavier performance penalty with pool instances all being flushed at about the same time.


        Issue Links



              erik Erik Dasher
              chris Chris Price
              Erik Dasher Erik Dasher
              0 Vote for this issue
              4 Start watching this issue



                Zendesk Support