FileSystemWatcher - buffer overrun on empty directory - do changes "cache" somewhere?

12 views Asked by At

I've got a FileSystemWatcher service tracking several network directories. When testing it locally, I get a series of buffer overrun messages (examples from log):

03/05/2024 15:16:57: \\sampleserver\samplefolder added to watch
03/05/2024 15:16:57: Error: File System Watcher internal buffer overflow
System.IO.InternalBufferOverflowException: Too many changes at once in directory:\\sampleserver\samplefolder

However, the folders are empty.

If I stop and re-start the service quickly, the directories load with no overrun errors. If I start it after several hours pause, I get the errors, again, with no files in the directories.

Files do come and go from the directories in question during the period the service is not running - Does some sort of record or history of the changes exist somewhere that the service is somehow seeing? Sounds crazy, but I'm trying to figure out how it could say there's too many changes in an empty directory.

0

There are 0 answers