Home All Groups Group Topic Archive Search About

FileSystemWatcher is unreliable

Author
23 Feb 2006 11:06 PM
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

Author
24 Feb 2006 8:27 AM
Nick Hounsome
Show quote
"Arnie" <jefferyronaldarn***@msn.com> wrote in message
news:OZFp$2MOGHA.1124@TK2MSFTNGP10.phx.gbl...
> 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.

AddThis Social Bookmark Button