About 2.5 weeks ago we starting seeing issues with file locks. Typically getting error 1705 "File access is denied". We have an internal VFP app that runs in 3 locations, each with its own server, and started seeing this at all locations. For the most part, this is code that has been running fine for years with no issues.
The code in particular where these issues happen do have some things in common:
The files are accessed over the network via Windows Server. We tried to disable oplocks using the set-smbshare and setting the LeasingMode to none. Every time we reboot the server everything works for a day or two. Then issues start to come back. We tried disabling antivirus, no joy.
We are in the process of refactoring our code to avoid this situation, like open exclusive the first time, keep log files open, etc.
Has anyone else who still uses VFP seen any similar behavior?
The code in particular where these issues happen do have some things in common:
- If a dbf is open shared, but then needs to be opened exclusive, the error will happen even in no one else is using the dbf (usually temporary tables)
- Calling FOPEN on a log file during a loop where is is repeatedly doing FOPEN and FCLOSE on the same file.
The files are accessed over the network via Windows Server. We tried to disable oplocks using the set-smbshare and setting the LeasingMode to none. Every time we reboot the server everything works for a day or two. Then issues start to come back. We tried disabling antivirus, no joy.
We are in the process of refactoring our code to avoid this situation, like open exclusive the first time, keep log files open, etc.
Has anyone else who still uses VFP seen any similar behavior?