From 77b1b665f8fdf39201d88408a527028de1a2868c Mon Sep 17 00:00:00 2001 From: PathToLife <12622625+PathToLife@users.noreply.github.com> Date: Thu, 26 Sep 2024 03:51:40 +1200 Subject: [PATCH] fix ngx_slab_alloc() failed: no memory for arm64 linux rpi pagesize 16k. Increase initialization lua_shared_dict size to 48k --- src/common/confs/init-worker-lua.conf | 2 +- src/common/settings.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/confs/init-worker-lua.conf b/src/common/confs/init-worker-lua.conf index b8d17b2a8..7717dfe42 100644 --- a/src/common/confs/init-worker-lua.conf +++ b/src/common/confs/init-worker-lua.conf @@ -1,4 +1,4 @@ -lua_shared_dict worker_lock 16k; +lua_shared_dict worker_lock {{ WORKERLOCK_MEMORY_SIZE }}; init_worker_by_lua_block { -- Libs diff --git a/src/common/settings.json b/src/common/settings.json index 014b63240..83018e0c9 100644 --- a/src/common/settings.json +++ b/src/common/settings.json @@ -117,6 +117,15 @@ "regex": "^(?! )(( *[^ ]+)(?!.*\\2))*$", "type": "text" }, + "WORKERLOCK_MEMORY_SIZE": { + "context": "global", + "default": "48k", + "help": "Size of lua_shared_dict for initialization workers", + "id": "workerlock-memory-size", + "label": "Initialization Workerlock memory size", + "regex": "^\\d+[kKmMgG]?$", + "type": "text" + }, "DATASTORE_MEMORY_SIZE": { "context": "global", "default": "64m",