Hello DUMITRASCU Claudiu-Alexandru,
Thank you for the question. You have posted the query on Azure Storage forums. For specialized assistance on a .NET query, kindly just repost the question on Developer Community to receive focused and immediate assistance from the right set of experts. However, based on my understanding of the issue, I am sharing a few suggestions.
The documentation for FileSystemWatcher states:
The system notifies your component of file changes in a buffer created by the FileSystemWatcher
. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the InternalBufferSize
property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use NotifyFilter and IncludeSubdirectories
properties so you can filter out unwanted change notifications.
Here is a discussion on similar issue that might help: https://stackoverflow.com/questions/75832346/filesystemwatcher-throws-system-io-internalbufferoverflowexception-in-c-sharp-wi
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.