prosody: make GC options configurable

Co-authored-by: Mustafa Ayberk Kale <mustafa.kale@turkcell.com.tr>
pull/1396/head
Mustafa Ayberk Kale 2 years ago committed by GitHub
parent bf6a68b174
commit 832b178d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docker-compose.yml
  2. 23
      prosody/rootfs/defaults/prosody.cfg.lua

@ -171,6 +171,12 @@ services:
- ENABLE_RECORDING
- ENABLE_XMPP_WEBSOCKET
- ENABLE_JAAS_COMPONENTS
- GC_TYPE
- GC_INC_TH
- GC_INC_SPEED
- GC_INC_STEP_SIZE
- GC_GEN_MIN_TH
- GC_GEN_MAX_TH
- GLOBAL_CONFIG
- GLOBAL_MODULES
- JIBRI_RECORDER_USER

@ -1,6 +1,12 @@
{{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }}
{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
{{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}}
{{ $GC_TYPE := .Env.GC_TYPE | default "incremental" -}}
{{ $GC_INC_TH := .Env.GC_INC_TH | default 150 -}}
{{ $GC_INC_SPEED := .Env.GC_INC_SPEED | default 250 -}}
{{ $GC_INC_STEP_SIZE := .Env.GC_INC_STEP_SIZE | default 13 -}}
{{ $GC_GEN_MIN_TH := .Env.GC_GEN_MIN_TH | default 20 -}}
{{ $GC_GEN_MAX_TH := .Env.GC_GEN_MAX_TH | default 100 -}}
-- Prosody Example Configuration File
--
@ -105,6 +111,23 @@ limits = {
};
}
--Prosody garbage collector settings
--For more information see https://prosody.im/doc/advanced_gc
{{ if eq $GC_TYPE "generational" }}
gc = {
mode = "generational";
minor_threshold = {{ $GC_GEN_MIN_TH }};
major_threshold = {{ $GC_GEN_MAX_TH }};
}
{{ else }}
gc = {
mode = "incremental";
threshold = {{ $GC_INC_TH }};
speed = {{ $GC_INC_SPEED }};
step_size = {{ $GC_INC_STEP_SIZE }};
}
{{ end }}
pidfile = "/config/data/prosody.pid";
-- Force clients to use encrypted connections? This option will

Loading…
Cancel
Save