From 0d7addd505f1f3a3c02c9fdc6844183c4dca4445 Mon Sep 17 00:00:00 2001 From: Pami Ketolainen Date: Fri, 3 Jan 2014 18:33:43 +0200 Subject: Fix database connection issues in prefork mode. When running in prefork mode, open DB connection got shared between the child process as DB was accessed very early in the init process. One child would then close the connection and cause others to fail. To fix this, connection.close() was added to the end of startup procedures. --- askbot/startup_procedures.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 3adbd781..02fda329 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -1062,3 +1062,5 @@ def run(): except AskbotConfigError, error: print error sys.exit(1) + # close DB connection to prevent issues in prefork mode + connection.close() -- cgit v1.2.3-1-g7c22