FlieSystemWatcher stops watching after at least 40min

  • Thread starter Thread starter Hasani
  • Start date Start date
H

Hasani

I have a window service that uses a filesystemwatcher object to monitor a
folder on the root drive. AFter about 40min of no activity, the
filesystemwatcher stops noticing changes on the folder.

I've done several things
1) have a timer output "PING!" every 60s to the trace (I use a telnet
tracer), doing that seems to prevent it from barfing.
2) Every 60s, set EnableRaiseEVents to false then true. That would generate
this error -> System.IO.InternalBufferOverflowException: Too many changes at
once in directory:C:\Epx.
3) Increase the internal buffer... it still stops noticing changes after
about 1hr.

Has anyone else had these problems. This code is running in a separate child
app domain if that means anything.
 
Back
Top