[Python-modules-team] python-inotifyx memory leak
oskar at cetex.se
oskar at cetex.se
Wed Apr 9 12:20:07 UTC 2014
Hi!
I'm using python-inotifyx to monitor a folder (and subfolders) for new
files and noticed my application continue to grow in memory consumption
(starts at 300kb and after an hour it's at 500MB and very slow)
I tracked it down to the inotifyx c-library not decreasing references
after it passes the event on.
the change is simple:
--- inotifyx/binding.c 2011-07-09 20:45:10.000000000 +0000
+++ inotifyx/binding.c.new 2014-04-09 12:11:01.597888661 +0000
@@ -194,6 +194,7 @@
if(PyList_Append(retvalue, value) == -1) {
return NULL;
}
+ Py_DECREF(value);
i += EVENT_SIZE + event->len;
}
I've run this in production for months without memory growth or other
issues.
I've created a ticket on the projects launchpad page, but haven't
received response for about a year so i guess the original maintainer
has lost interest.
Will you include this in future inotifyx releases?
Best Regards
Oskar Stenman
More information about the Python-modules-team
mailing list