Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] winapi.BUFFER_SIZE now defaults to 64000 (instead of 2048) #709

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

BoboTiG
Copy link
Collaborator

@BoboTiG BoboTiG commented Dec 1, 2020

To handle cases with lot of changes, this seems the highest safest value we can use.

Note: it will fail with ERROR_INVALID_PARAMETER when it is greater than 64 KB and the application is monitoring a directory over the network. This is due to a packet size limitation with the underlying file sharing protocols. https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw#remarks

Also introduced winapi.PATH_BUFFER_SIZE (defaults to 2048) to keep the old behavior with path-related functions.

To handle cases with lot of changes, this seems the highest safest value we can use.

Note: it will fail with `ERROR_INVALID_PARAMETER` when it is greater than 64 KB and
      the application is monitoring a directory over the network.
      This is due to a packet size limitation with the underlying file sharing protocols.
      https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw#remarks

Also introduced `winapi.PATH_BUFFER_SIZE` (defaults to `2048`)
to keep the old behavior with path-realted functions.
@BoboTiG
Copy link
Collaborator Author

BoboTiG commented Dec 1, 2020

cf #264.

@BoboTiG BoboTiG merged commit f2c28b2 into master Dec 1, 2020
@BoboTiG BoboTiG deleted the fix-700-higher-buffer-len branch December 1, 2020 11:23
@Elwycliffs
Copy link

Hello @BoboTiG Experiencing a similar issue with the latest version of watchdog. PollingObserver works well for a while but then stops. Files are created by an MIS system within a span of minutes, sometimes seconds.

Setup

  1. Watchdog Host (Linux VM)
  2. Windows Network Drive with CIFS

@dorlugasigal
Copy link

Hello @BoboTiG Experiencing a similar issue with the latest version of watchdog. PollingObserver works well for a while but then stops. Files are created by an MIS system within a span of minutes, sometimes seconds.

Setup

  1. Watchdog Host (Linux VM)
  2. Windows Network Drive with CIFS

@Elwycliffs did you manage to find a fix for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execution stuck when watching directory updated very fast by external program/script
3 participants