When using a single filename for multiple processes, one may observe the 
following behavior::

* normal logging until the file reaches maxbytes

* above maxbytes:
   - erratic and prolific creation backups
   - logging to backups
   - backups that are significantly less than maxbytes

What happens here is that os.rename does not close handle other 
RotatingFileHandler instances have open, leaving them to attempt to 
rotate the previously open handle after they log.  Since, if I 
understand correctly, open handles track by inode rather than filename, 
already rotated files get written to and erroneously renamed.

A fix for this is contained within the following patches.  The first is 
specific to python 2.6, the other should be compatible with any version 
of python that has newstyle classes.  I have only tested it with 2.6 and 
2.7.

Python 2.6 implementation

https://github.com/SurveyMonkey/supervisor/commit/ce7db09db8ffe1aee269778a187e4c41ff319609


BW compat version

https://github.com/SurveyMonkey/supervisor/commit/d01dc1a590f1ee662d4f7f619a371959386ee0ea



-w

-- 
 >>>
Whit Morriss
CodeMonkey
[email protected]

_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to