JRuby max requests per instance
The jruby_max_requests_per_instance setting determines the maximum
number of HTTP requests a JRuby handles before it's
terminated. When a JRuby instance reaches this limit, it's
flushed from memory and replaced with a fresh one.
PE Master
puppet_enterprise::master::puppetserver::jruby_max_requests_per_instance
max_requests_per_instance parameter in the pe-puppet-server.conf settings and in open source Puppet.0
- To circumvent a known memory leak associated with Puppet Server JRuby flushing, the default value for the
jruby-puppet.max-requests-per-instancesetting inpe-puppetserver(which is configurable via thepuppet_enterprise::master::puppetserver::max_requests_per_instanceparameter in Hiera) has changed from100000to0. This disables JRuby instance flushing.
- Changing the
jruby-puppet.max-requests-per-instancesetting results in a full restart of thepe-orchestration-services, which is required to clear any leaked memory, rather than a service reload which was previously required.
An integer representing a number of HTTP requests
More frequent JRuby flushing can help address memory leaks, because it prevents any one interpreter from consuming too much RAM. However, performance is reduced slightly each time a new JRuby instance loads. Therefore, set this parameter to get a new interpreter no more than once every few hours.
Requests are balanced across multiple interpreters running concurrently, so the lifespan of each interpreter varies.






