FileSystemWatcher is unreliable

A

Arnie

We have noticed that the FileSystemWatcher is not reliable. It is not easily
repeatable but sometime it fails to catch file system changes. When it gets
into this state it doesn't recover unless a reboot is done.

The problem is only seen when multiple files are copied to the system in
quick succession. Once the watcher misses a file *any* subsequent incoming
file isn't seen.

I found this comment on the http://www.experts-exchange.com site:

I also include a "directory sweep" that periodically checks the directories
that the filewatchers are monitoring to make certain no files have been
missed and to detect files that may have been created while the filewatchers
were not running. remember if a file is placed in a directory and the file
watcher is started afterwords - the File_Created event will not fire.

It seems that others have experienced this bugger.

Any other ideas or comments?

-jeff
 
N

Nick Hounsome

Arnie said:
We have noticed that the FileSystemWatcher is not reliable. It is not
easily repeatable but sometime it fails to catch file system changes. When
it gets into this state it doesn't recover unless a reboot is done.

The problem is only seen when multiple files are copied to the system in
quick succession. Once the watcher misses a file *any* subsequent incoming
file isn't seen.

I found this comment on the http://www.experts-exchange.com site:

I also include a "directory sweep" that periodically checks the
directories that the filewatchers are monitoring to make certain no files
have been missed and to detect files that may have been created while the
filewatchers were not running. remember if a file is placed in a directory
and the file watcher is started afterwords - the File_Created event will
not fire.

It seems that others have experienced this bugger.

Any other ideas or comments?

An idea:

A possible inference is that the watcher just checks the modified time on
the directory and the resolution is not high enough:

If a file is added, the watcher sees a change and finds it and another file
is added all in a time less than the resolution of the stored time then it
would not see it.

This wouldn't explain subsequent failure though and I don't know what
resolution is used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top