diff --git a/jobs/log-cache/spec b/jobs/log-cache/spec index f7f58ef3..08e7d5ee 100644 --- a/jobs/log-cache/spec +++ b/jobs/log-cache/spec @@ -43,6 +43,9 @@ properties: description: "Percentage of system memory to use for the cache. Must be an integer." default: 50 + memory_limit_bytes: + description: "Overrides memory_limit_percent with a specific size cache in bytes." + max_per_source: description: "The maximum number of items stored in LogCache per source." default: 100000 diff --git a/jobs/log-cache/templates/bpm.yml.erb b/jobs/log-cache/templates/bpm.yml.erb index 7e9c6b7e..6d09c4cb 100644 --- a/jobs/log-cache/templates/bpm.yml.erb +++ b/jobs/log-cache/templates/bpm.yml.erb @@ -25,6 +25,9 @@ processes: env: ADDR: "<%= ":#{p('port')}" %>" MEMORY_LIMIT_PERCENT: "<%= p('memory_limit_percent') %>" +<%- if_p('memory_limit_bytes') do |memory_limit_bytes| %> + MEMORY_LIMIT_BYTES: "<%= memory_limit_bytes %>" +<% end -%> MAX_PER_SOURCE: "<%= p('max_per_source') %>" INGRESS_BUFFER_SIZE: "<%= p('ingress_buffer_size') %>" INGRESS_BUFFER_READ_BATCH_SIZE: "<%= p('ingress_buffer_read_batch_size') %>"