seb-m/pyinotify — Issue #28: Inotify stops Work after few hours
Author: Gotterdammerung
Created: 2011-12-05 10:10:55+00:00
State: open

Hey,
my script watch 5 directorys if new file is create.
Everythink works great for a few hours, but then inotify freez.
i have no idea what is the problem, other parts of the script works.

wm = pyinotify.WatchManager() # Watch Manager
mask = pyinotify.IN_CREATE # watched events

class EventHandler(pyinotify.ProcessEvent):
def process_IN_CREATE(self, event):
print "Find File:", event.pathname

handler = EventHandler()
notifier = pyinotify.Notifier(wm, handler)

hanse_inv = wm.add_watch('/home/123', mask, rec=True)
hanse_umlagerung = wm.add_watch('/home/456', mask, rec=True)
hanse_wa = wm.add_watch('/home/789', mask, rec=True)
hanse_we = wm.add_watch('/home/012', mask, rec=True)
intime = wm.add_watch('/home/345', mask, rec=True)

notifier.loop()

Works nice for a few hours but then it stop working.
i tryed notifier.start & stop and daemonized mode, everyhing the same.

Is there any reasone?