From e06b736c5bc59307137abe143442a5c5c1cf9921 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Wed, 16 Sep 2009 02:39:45 +0000 Subject: [PATCH] Split the db connection between multiple Processes. To do this, you must close the db connection at the Process creation, so the process can re-create its own connection. --- utils/feed_fetcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/feed_fetcher.py b/utils/feed_fetcher.py index e9f4276f8..66b33e9e5 100644 --- a/utils/feed_fetcher.py +++ b/utils/feed_fetcher.py @@ -225,6 +225,10 @@ class Dispatcher: def process_feed_wrapper(self): """ wrapper for ProcessFeed """ + # Close the DB so the connection can be re-opened on a per-process basis + from django.db import connection + connection.close() + current_process = multiprocessing.current_process() while True: