Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Prosody version to 0.12.4 + Lua5.4 #300

Open
JohnXLivingston opened this issue Jan 25, 2024 · 0 comments
Open

Update Prosody version to 0.12.4 + Lua5.4 #300

JohnXLivingston opened this issue Jan 25, 2024 · 0 comments

Comments

@JohnXLivingston
Copy link
Owner

Currently the plugin is using Prosody 0.12.3+Lua5.2, based on Debian bullseye.
The Prosody Appimage for Prosody 0.12.4+Lua5.5 based on Debian Bookworm is ready: https://github.com/JohnXLivingston/prosody-appimage/releases/tag/v0.12.4-1

To change the Prosody version:

diff --git a/build-prosody.sh b/build-prosody.sh
index b121a2a4c..4a967d002 100644
--- a/build-prosody.sh
+++ b/build-prosody.sh
@@ -6,12 +6,12 @@ set -euo pipefail
 # This script download the Prosody AppImage from the https://github.com/JohnXLivingston/prosody-appimage project.
 
 repo_base_url='https://github.com/JohnXLivingston/prosody-appimage/releases/download'
-wanted_release='v0.12.3-1'
+wanted_release='v0.12.4-1'
 
 x86_64_filename='prosody-x86_64.AppImage'
-x86_64_sha256sum='f4af9bfefa2f804ad7e8b03a68f04194abb801f070ae620b3d4bcedb144e8523'
+x86_64_sha256sum='7d92bf2bfcb0bc6d7a3bf82b0c17e5280d34bcddbfea93510c44b69615140d42'
 aarch64_filename='prosody-aarch64.AppImage'
-aarch64_sha256sum='878c5be719e1e36a84d637fd2bd44e3059aa91ddb6906ad05f1dd0334078df09'
+aarch64_sha256sum='a48704e4da73fba560217ee483ec89ba5fc6741a1978647bb5c29fcb24d28ab6'
 
 download_dir="$(pwd)/vendor/prosody-appimage"
 dist_dir="$(pwd)/dist/server/prosody"

Warning: it seems that defaults Garbage Collection parameters for this version are not optimal (see tests 33-prosody-gc).

So, if we update the version, we should tweak those parameters.

Tweaking these parameters can be achieved doing this (for example):

diff --git a/server/lib/prosody/config/content.ts b/server/lib/prosody/config/content.ts
index b0660186c..5a25bf633 100644
--- a/server/lib/prosody/config/content.ts
+++ b/server/lib/prosody/config/content.ts
@@ -476,6 +476,15 @@ class ProsodyConfigContent {
     let content = ''
     content += this.global.write()
     content += this.log + '\n'
+
+    content += `
+gc = {
+  mode = "generational";
+  minor_threshold = 5;
+  major_threshold = 50;
+};
+    `
+
     content += '\n\n'
     if (this.authenticated) {
       content += this.authenticated.write()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant