-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Upstream project seems to be orphaned.
- Timestamps in debug log
- Useless periodic config update is disabled by default
- Proper config handling, exit if config failed at startup
- max_retry_count is 0 by default
- Don't do last sleep(2) after last retry
- Per-host negative cache for errors ECONNREFUSED and ETIMEDOUT (adds C++ to build requirements)
There is situation when GUI software in file open dialog try to stat some history files that were used in that software. And also with retries (guess how much, yes 3). So when you turned off your NAS box for example, that was used with smbnetfs previously. And try to save some file in your browser, it tries to stat dozens of files on that NAS. Each file is tried 3 * 3 times with 2 seconds delay between each try (fortunately, GUI software does not add delay, only smbnetfs). So, each file will take 18 seconds. And dozens of such files -- in my case more, than hundred will be 18 seconds * 100 = 30 minutes. That is, the browser will freeze for 30 minutes. It's obvious, that smbnetfs becomes unusable in such cases. Suggested patch tries to address such problems by minimizing delays in smbnetfs. It will cache negative responses from hosts, and will not pass multiple requests in short periods of time. On each check it cleans cache for items that are older, than 3 seconds. Currently it works only with 2 errors: connection error and connection timeout -- practically that covers all hot spots. The patch have received decent testing with unit test and performance test.