I have an app (that should really be a service, but I haven't got round to
it yet) that just monitors a network folder via a filesystemwatcher for new
files and then does its thing. Generally, it works fine, but it fails about
once a month - which is about one every 2-3 hundred files. No error message
or exceptions... it just fails to notice that the file has appeared. After
that, any other new files are also ignored.

I'm thinking of switching to a dir function running every ten seconds or
so....but was wondering if anyone had any ideas about the situation.

RE: FileSystemWatcher fails by Nathan

Nathan
Thu Jan 20 21:13:01 CST 2005

Hi Rob,
Are you subscribing to the Error Event? Per the docs it sounds like an
internal buffer overflow which won't raise an excpetion but will raise the
FileSystemWatcher.Error Event. If the Error event is never being raised I'd
still play with the InternalBufferSize property to see if it has any affect.

You may also be able to get a dump when notifications stop and hunt down the
internal buffer to see if it's full or not just to verify whether or not this
is the case.

HTH,
Nathan



"Rob Oldfield" wrote:

> I have an app (that should really be a service, but I haven't got round to
> it yet) that just monitors a network folder via a filesystemwatcher for new
> files and then does its thing. Generally, it works fine, but it fails about
> once a month - which is about one every 2-3 hundred files. No error message
> or exceptions... it just fails to notice that the file has appeared. After
> that, any other new files are also ignored.
>
> I'm thinking of switching to a dir function running every ten seconds or
> so....but was wondering if anyone had any ideas about the situation.
>
>
>
>

Re: FileSystemWatcher fails by Rob

Rob
Fri Jan 21 03:14:41 CST 2005

Thanks for that. I haven't touched the error event so I'll give it a go.


"Nathan" <Nathan@discussions.microsoft.com> wrote in message
news:39372340-574C-4ED7-A902-11730EA020C7@microsoft.com...
> Hi Rob,
> Are you subscribing to the Error Event? Per the docs it sounds like an
> internal buffer overflow which won't raise an excpetion but will raise the
> FileSystemWatcher.Error Event. If the Error event is never being raised
I'd
> still play with the InternalBufferSize property to see if it has any
affect.
>
> You may also be able to get a dump when notifications stop and hunt down
the
> internal buffer to see if it's full or not just to verify whether or not
this
> is the case.
>
> HTH,
> Nathan
>
>
>
> "Rob Oldfield" wrote:
>
> > I have an app (that should really be a service, but I haven't got round
to
> > it yet) that just monitors a network folder via a filesystemwatcher for
new
> > files and then does its thing. Generally, it works fine, but it fails
about
> > once a month - which is about one every 2-3 hundred files. No error
message
> > or exceptions... it just fails to notice that the file has appeared.
After
> > that, any other new files are also ignored.
> >
> > I'm thinking of switching to a dir function running every ten seconds or
> > so....but was wondering if anyone had any ideas about the situation.
> >
> >
> >
> >