From a76e195b25aa34ab1d22a12d42029ed34cfd042d Mon Sep 17 00:00:00 2001 From: Tuomas Laine Date: Fri, 1 Sep 2023 14:40:35 +0000 Subject: [PATCH] Add deployment note about thread count --- doc/DEPLOYMENT.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/DEPLOYMENT.md b/doc/DEPLOYMENT.md index ae887c5..af30740 100644 --- a/doc/DEPLOYMENT.md +++ b/doc/DEPLOYMENT.md @@ -66,6 +66,13 @@ recloned from git afterwards but it is still generally faster to do that than to Only the Huey process needs access to the build folder while only the main django process needs access to the publish folder. Both processes need access to the store folder. +# Number of threads per process + +Each process should only have a single thread as the advisory file locks obtained by the lockf posix +function are process specific. This means that two threads in the same process accessing the same +file at the same time can cause issues with the lock being released early or a lock being given when +it shouldn't (because the other thread had it). This should be very rare but to eliminate the +possibility, only one thread should be run per process. # Custom build runners (running builds on something other than locally or on docker containers)