From 35a86c5d3de5e2391997c9931169fe3f1a2916a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Andrei?= Date: Tue, 26 Sep 2023 16:22:04 -0300 Subject: [PATCH] Add ZOPE_FORM_MEMORY_LIMIT environment variable to configure (#129) * Add ZOPE_DOS_PROTECTION environment variable to configure * Rename variable to ZOPE_FORM_MEMORY_LIMIT --- skeleton/docker-entrypoint.sh | 2 ++ skeleton/etc/relstorage.conf | 4 ++++ skeleton/etc/zeo.conf | 4 ++++ skeleton/etc/zope.conf | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/skeleton/docker-entrypoint.sh b/skeleton/docker-entrypoint.sh index 2cc9112..eadfdca 100755 --- a/skeleton/docker-entrypoint.sh +++ b/skeleton/docker-entrypoint.sh @@ -27,6 +27,8 @@ fi [ -z ${DEFAULT_ZPUBLISHER_ENCODING+x} ] && export DEFAULT_ZPUBLISHER_ENCODING=utf-8 [ -z ${COMPILE_MO_FILES+x} ] && export COMPILE_MO_FILES=true [ -z ${DEBUG_MODE+x} ] && export DEBUG_MODE=off +[ -z ${ZOPE_FORM_MEMORY_LIMIT+x} ] && export ZOPE_FORM_MEMORY_LIMIT=4MB + # ZODB ENV Vars [ -z ${ZODB_CACHE_SIZE+x} ] && export ZODB_CACHE_SIZE=50000 diff --git a/skeleton/etc/relstorage.conf b/skeleton/etc/relstorage.conf index 4d1ee83..93a44d6 100644 --- a/skeleton/etc/relstorage.conf +++ b/skeleton/etc/relstorage.conf @@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING) CHAMELEON_CACHE $INSTANCE/var/cache + + form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT) + + # Main database cache-size $(ZODB_CACHE_SIZE) diff --git a/skeleton/etc/zeo.conf b/skeleton/etc/zeo.conf index 3413c49..4dc1821 100644 --- a/skeleton/etc/zeo.conf +++ b/skeleton/etc/zeo.conf @@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING) CHAMELEON_CACHE $INSTANCE/var/cache + + form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT) + + # Main database cache-size $(ZODB_CACHE_SIZE) diff --git a/skeleton/etc/zope.conf b/skeleton/etc/zope.conf index 9709fb3..5144052 100644 --- a/skeleton/etc/zope.conf +++ b/skeleton/etc/zope.conf @@ -10,6 +10,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING) CHAMELEON_CACHE $INSTANCE/var/cache + + form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT) + + # Main database cache-size $(ZODB_CACHE_SIZE)