Browse Source

Clearing parse warnings at every parse config call.

Without this change, configurations that generated parse
warnings would cause the parse_warnings array to grow
without bounds as reload() was called.  In an application
where reload() is called repeatedly, the memory usage
of the supervisord process grew over time.

Addresses https://github.com/Supervisor/supervisor/issues/89
Philip Zeyliger 13 years ago
parent
commit
cf16e6a313
1 changed files with 3 additions and 0 deletions
  1. 3 0
      supervisor/options.py

+ 3 - 0
supervisor/options.py

@@ -481,6 +481,9 @@ class ServerOptions(Options):
         self.process_group_configs = new
 
     def read_config(self, fp):
+        # Clear parse warnings, since we may be re-reading the
+        # config a second time after a reload.
+        self.parse_warnings = []
         section = self.configroot.supervisord
         if not hasattr(fp, 'read'):
             try: