Clear the Django connection query log after each tick.  This was a major memory 
leak.

Signed-off-by: Steve Howard <[email protected]>

--- autotest/scheduler/monitor_db.py    2009-12-18 02:24:44.000000000 -0800
+++ autotest/scheduler/monitor_db.py    2009-12-18 02:24:48.000000000 -0800
@@ -5,13 +5,18 @@
 """
 
 
+import common
 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal
 import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback
 import itertools, logging, weakref, gc
-import common
+
 import MySQLdb
+
 from autotest_lib.scheduler import scheduler_logging_config
 from autotest_lib.frontend import setup_django_environment
+
+import django.db
+
 from autotest_lib.client.common_lib import global_config, logging_manager
 from autotest_lib.client.common_lib import host_protections, utils
 from autotest_lib.database import database_connection
@@ -664,6 +669,7 @@
         self._handle_agents()
         _drone_manager.execute_actions()
         email_manager.manager.send_queued_emails()
+        django.db.reset_queries()
         self._tick_count += 1
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to