Partner and Community Forums
Windows Cache Extension for PHP
Cannot delete file (file in use)
Last post Mar 29, 2012 10:41 AM by chardcastle
Jan 21, 2011 07:25 PM|echoDreamz|LINK
When using WinCache users cannot delete files / folders until the application pool is recycled. This is quite a big deal as it gets anoyying constantly having to reset the application pool so for instance vBulletin can continue to run (must delete the install
folder), WHMCS (must delete install folder) and other scripts like this.
When trying to delete a file / folder you receive a notification stating the file is in use. This issue goes away once WinCache has been disabled or the application pool is recycled.
Jan 22, 2011 03:37 PM|steve schofield|LINK
I would run process explorer and see if the w3wp process has a handle on the file. That would explain it. Does it only happen on applications that are writing configuration such as vBulletin.
Windows Server MVP - IIS
Log archival solution
Install, Configure, Forget
Jan 23, 2011 04:36 AM|echoDreamz|LINK
IE once installation completes; and it tries to load the admincp, it fails saying you must delete the install folder first, however you cannot do this via FTP, explorer etc. as it says its in use.
Restarting the application pool fixes this. We also have customers that report issues upgrading modules / plugins with wordpress saying it could not remove x file etc.
Jan 25, 2011 06:54 PM|math-hew|LINK
This is the same issue reported here,
here and in other threads. It's a serious problem with WinCache and not limited to vBulletin.
Jan 25, 2011 07:53 PM|echoDreamz|LINK
Well that is nice to know! Come on Microsoft... Any fixes for this highly annoying and discouraging bug?
Mar 29, 2012 10:41 AM|chardcastle|LINK
I have been having the same issue with my cached template files. Everytime I try to clear them it fails because the files are locked. Recycling the application pool fixes it but this isn't ideal.
After messing around with different config settings I think I have found a workout around that does the trick. In your wincache settings try setting wincache.fcndetect = 0 and instead set wincache.chkinterval = 60 (or whatever interval works for your application)
Doing this seems to remove the file lock because checking for updates to the files is now done periodically. Can someone else try this to confirm?