[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loolwsd.xml.in wsd/LOOLWSD.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jul 31 20:52:43 UTC 2017


 loolwsd.xml.in  |    4 ++++
 wsd/LOOLWSD.cpp |    4 ++++
 2 files changed, 8 insertions(+)

New commits:
commit b534c163e6d37a5134316d691f5e66dcf70ee01b
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Jun 11 11:39:15 2017 -0400

    wsd: add rlimit config entries and defaults
    
    Change-Id: I8cb498d01bc1a7a55d168e49c754bb1bba80aea1
    Reviewed-on: https://gerrit.libreoffice.org/38673
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit 9cb82cebe3edf1e6d9c6cac6e433abbc638c26f6)
    Reviewed-on: https://gerrit.libreoffice.org/38758
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 6f8d6d35..a8b67737 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -16,6 +16,10 @@
     <per_document desc="Document-specific settings, including LO Core settings.">
         <max_concurrency desc="The maximum number of threads to use while processing a document." type="uint" default="4">4</max_concurrency>
         <idle_timeout_secs desc="The maximum number of seconds before unloading an idle document. Defaults to 1 hour." type="uint" default="3600">3600</idle_timeout_secs>
+        <limit_virt_mem_kb desc="The maximum virtual memory allowed to each document process. 0 for unlimited, 1700 min." type="uint">0</limit_virt_mem_kb>
+        <limit_data_mem_kb desc="The maximum memory data segment allowed to each document process. 0 for unlimited." type="uint">0</limit_data_mem_kb>
+        <limit_stack_mem_kb desc="The maximum stack size allowed to each document process. 0 for unlimited." type="uint">8000</limit_stack_mem_kb>
+        <limit_file_size_mb desc="The maximum file size allowed to each documen process to write. 0 for unlimited." type="uint">50</limit_file_size_mb>
     </per_document>
 
     <per_view desc="View-specific settings.">
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 7174c864..edf1184a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -620,6 +620,10 @@ void LOOLWSD::initialize(Application& self)
             { "num_prespawn_children", "1" },
             { "per_document.max_concurrency", "4" },
             { "per_document.idle_timeout_secs", "3600" },
+            { "per_document.limit_virt_mem_mb", "0" },
+            { "per_document.limit_data_mem_kb", "0" },
+            { "per_document.limit_stack_mem_kb", "8000" },
+            { "per_document.limit_file_size_mb", "50" },
             { "per_view.out_of_focus_timeout_secs", "60" },
             { "per_view.idle_timeout_secs", "900" },
             { "loleaflet_html", "loleaflet.html" },


More information about the Libreoffice-commits mailing list