From 2d3ae6ae6eac9c7b6e1c13a3c98f3e1dd9429e38 Mon Sep 17 00:00:00 2001 From: JohT <7671054+JohT@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:02:59 +0100 Subject: [PATCH 1/2] Minimize Neo4j transaction log disk space utilization --- scripts/configuration/template-neo4j-v4.conf | 5 ++++- scripts/configuration/template-neo4j.conf | 5 ++++- scripts/setupNeo4j.sh | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/configuration/template-neo4j-v4.conf b/scripts/configuration/template-neo4j-v4.conf index ef3ea6696..8a1200af5 100644 --- a/scripts/configuration/template-neo4j-v4.conf +++ b/scripts/configuration/template-neo4j-v4.conf @@ -19,4 +19,7 @@ dbms.jvm.additional=-XX:+ExitOnOutOfMemoryError dbms.memory.transaction.global_max_size=6g # Memory: Limit the amount of memory that a single transaction can consume. -dbms.memory.transaction.max_size=6g \ No newline at end of file +dbms.memory.transaction.max_size=6g + +# Transaction: Retention policy for transaction logs needed to perform recovery and backups. +dbms.tx_log.rotation.retention_policy=keep_none \ No newline at end of file diff --git a/scripts/configuration/template-neo4j.conf b/scripts/configuration/template-neo4j.conf index 0427ec16a..ef08724b2 100644 --- a/scripts/configuration/template-neo4j.conf +++ b/scripts/configuration/template-neo4j.conf @@ -19,4 +19,7 @@ server.jvm.additional=-XX:+ExitOnOutOfMemoryError db.memory.transaction.total.max=6g # Memory: Limit the amount of memory that a single transaction can consume. -db.memory.transaction.max=6g \ No newline at end of file +db.memory.transaction.max=6g + +# Transaction: Retention policy for transaction logs needed to perform recovery and backups. +db.tx_log.rotation.retention_policy=keep_none \ No newline at end of file diff --git a/scripts/setupNeo4j.sh b/scripts/setupNeo4j.sh index 35b147d7d..9b0d2afd7 100755 --- a/scripts/setupNeo4j.sh +++ b/scripts/setupNeo4j.sh @@ -98,8 +98,10 @@ if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then echo "setupNeo4j: Commenting out configuration properties that will later be replaced or are not needed" if [[ "$NEO4J_MAJOR_VERSION_NUMBER" -ge 5 ]]; then sed -i.backup '/^server\.directories\.import=/ s/^/# defined in the directory section further below #/' "${NEO4J_CONFIG}" + sed -i.backup '/^db\.tx_log\.rotation\.retention_policy=/ s/^/# defined in the transaction section further below #/' "${NEO4J_CONFIG}" else sed -i.backup '/^dbms\.directories\.import=/ s/^/# defined in the directory section further below #/' "${NEO4J_CONFIG}" + sed -i.backup '/^dbms\.tx_log\.rotation\.retention_policy=/ s/^/# defined in the transaction section further below #/' "${NEO4J_CONFIG}" fi # Remove the backup file rm -f "${NEO4J_CONFIG}.backup" @@ -161,7 +163,7 @@ if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then } >> "${NEO4J_CONFIG}" fi - echo "setupNeo4j: Configuring static settings (memory, procedure permittions, ...)" + echo "setupNeo4j: Configuring static settings (memory, procedure permissions, ...)" if [[ "$NEO4J_MAJOR_VERSION_NUMBER" -ge 5 ]]; then cat "${SCRIPTS_DIR}/configuration/template-neo4j.conf" >> "${NEO4J_CONFIG}" else From 8b34b4d114399b267e40cadffd24cf9fed5c47e2 Mon Sep 17 00:00:00 2001 From: JohT <7671054+JohT@users.noreply.github.com> Date: Sun, 22 Dec 2024 09:19:59 +0100 Subject: [PATCH 2/2] Fix "No useable sandbox" by --no-sandbox workaround. Details see https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu --- graph-visualization/renderVisualizations.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graph-visualization/renderVisualizations.js b/graph-visualization/renderVisualizations.js index 0211d6d84..e8e13956e 100644 --- a/graph-visualization/renderVisualizations.js +++ b/graph-visualization/renderVisualizations.js @@ -136,7 +136,8 @@ let browser; "--disable-component-extensions-with-background-pages", "--disable-client-side-phishing-detection", "--use-gl=disabled", - "--disable-features=Vulkan", + "--disable-features=Vulkan", + "--no-sandbox" // See https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu ], }); // { headless: false } for testing