Hello!
I’m having a particular behavior in IIS 8.5 that is giving me a headache.
In one server we have a file.pdf published under an app pool that is frequently accessed (http access).
And we have an app that should do the following by ftp:
1 – Copy “file.pdf.~~~” to the server
2 - Delete “file.pdf”
3 – Rename “file.pdf.~~~” to “file.pdf”
4 – If gets error, try again
But...It looks like the deleting process takes too much time , so we’re having error indicating that the “file.pdf” still exists, even after the ftp accepted the delete command.
date | time | c-ip | s-sitename | s-ip | cs-method | cs-uri-stem | sc-status | sc-win32-status | sc-substatus | sc-bytes | cs-bytes | time-taken |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | stor | /directory/file.pdf.~~~ | 226 | 0 | 0 | 78 | 863710 | 515 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnfr | /directory/file.pdf.~~~ | 350 | 0 | 0 | 56 | 36 | 32 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnto | /directory/file.pdf | 550 | 5 | 2 | 24 | 32 | 0 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | dele | /directory/file.pdf | 250 | 0 | 0 | 30 | 32 | 0 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnfr | /directory/file.pdf.~~~ | 350 | 0 | 0 | 56 | 36 | 0 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnto | /directory/file.pdf | 550 | 5 | 2 | 24 | 32 | 0 |
16/06/2016 | 13:19:01 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | quit | - | 221 | 0 | 0 | 14 | 6 | 0 |
16/06/2016 | 13:19:05 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | stor | /directory/file.pdf.~~~ | 226 | 0 | 0 | 78 | 863710 | 469 |
16/06/2016 | 13:19:05 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnfr | /directory/file.pdf.~~~ | 350 | 0 | 0 | 56 | 36 | 15 |
16/06/2016 | 13:19:05 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnto | /directory/file.pdf | 550 | 5 | 2 | 24 | 32 | 16 |
16/06/2016 | 13:19:05 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | dele | /directory/file.pdf | 550 | 5 | 2 | 24 | 32 | 0 |
16/06/2016 | 13:19:05 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | quit | - | 221 | 0 | 0 | 14 | 6 | 0 |
16/06/2016 | 13:19:19 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | stor | /directory/file.pdf.~~~ | 226 | 0 | 0 | 78 | 863710 | 485 |
16/06/2016 | 13:19:19 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnfr | /directory/file.pdf.~~~ | 350 | 0 | 0 | 56 | 36 | 31 |
16/06/2016 | 13:19:19 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | rnto | /directory/file.pdf | 250 | 0 | 0 | 30 | 32 | 0 |
16/06/2016 | 13:19:19 | 10.7.36.160 | FTPSVC2 | 10.5.3.161 | quit | - | 221 | 0 | 0 | 14 | 6 | 0 |
In my searches, I have found that the delete command mark the file for deletion. So, the file will be delete after the last handle that accessed the file, before it was closed. And w3wp.exe is taking around 7 seconds to close the file... So, when I run again the app after some seconds it works, because the file.pdf was already deleted by the task I runed before.
Is There any configuration that would help me “free” the file for deletion instantaneously?