Caching Problem

Although I posted into a topic that seemed to describe my problem exactly, I was asked to create a new topic. Here goes.

WinXP, SmartFTP v4.0.1066

I right click on a file on remote server and Edit. The file seems to be transferred and opens in my editor, but the version in the editor is not the same as the version on the server.

This doesn't happen every time. Clearing the temporary files doesn't seem to help.

This is a big problem in that I've overwritten several newer versions with older version and had to go into my backups to recover them.

A related problem is that about half the time when I Edit as above even with the correct file, and then save, the monitoring fails. If I try closing the file and reEditing it, the new version appears in my editor, but the server has never been updated. Only closing down SmartFTP and restarting it gets things working again, and only temporarily. It usually only takes editing 4 or 5 files before the monitoring fails.

Here's the proceedure I followed based on the other thread.

Upgraded to v4.0.1066.0
Stopped queue
Viewed file
double clicked the file in the queue, a dialog popped up with nothing in it.
Started queue.

Same old file.

Even if I then upload a new version of the file and follow same proceedure, same problem happens.

This is really bad because I've overwritten several files with older version. It doesn't happen all the time, only rarely.

Occasionally the files appears corrupted, as if part of the file is there, and a piece of another file is appended at the bottom. Corrupted cache?
Files are uploaded only in binary mode. The file in question is a PHP file.

I've only noticed this problem over the past month or so since I upgraded.

Here's a log entry during a transaction
[2009-11-10T10:57:12] Log opened
[2009-11-10T10:57:12] Initializing. Transfer Queue v4.0.1066.0.
[2009-11-10T10:57:12] Operation Begin
[2009-11-10T10:57:12] SIZE vendor.inc
[2009-11-10T10:57:12] 213 5629
[2009-11-10T10:57:12] MDTM vendor.inc
[2009-11-10T10:57:12] 213 20091110182835
[2009-11-10T10:57:12] Source File: Size=5629, Time=2009-11-10T18:28:35
[2009-11-10T10:57:12] Destination File: Size=5629, Time=2009-11-10T18:28:36
[2009-11-10T10:57:12] RecentTime=2009-11-10T18:57:12
[2009-11-10T10:57:12] Rule "IF Destination Time=Newer AND Size=Equal AND Transfer=No Matter THEN Skip" matched. Action="Skip".
[2009-11-10T10:57:12] Skipping file "vendor.inc". Reason: User action.
[2009-11-10T10:57:12] Operation End
[2009-11-10T10:57:12] Log closed

The problem is that the file on your local computer is newer than the one on the server and that is why the file is not downloaded (again).

To change the behavior go to the menu: Tools->Settings. Then go to the General->Remote Edit dialog and enable the [x] always overwrite file option.

Regards,
Mat


The problem is that the file on your local computer is newer than the one on the server and that is why the file is not downloaded (again).

To change the behavior go to the menu: Tools->Settings. Then go to the General->Remote Edit dialog and enable the [x] always overwrite file option.

Regards,
Mat

But the file on my computer isn't newer. There's clearly a bug that's crept into the software because I've been using it for years and have never had problems before.

I will try your suggestion though, and I expect it will at least work around the problem.

The log you have posted is it from a download or an upload?


The log you have posted is it from a download or an upload?

I turned logging on, right clicked a remote file and clicked Edit, then once the file loaded into my editor I turned logging off.

The file retrieved from the server into my editor was not current, and it's strange that the local file which was in temporary file cache is just one second newer than the file on the server. I can't type and save that fast.

The server time is probably not in sync with your computer time. I guess the server time is not synchronized with a time server.


The server time is probably not in sync with your computer time. I guess the server time is not synchronized with a time server.

All my servers are synced, but it seems like something else. Do you have an idea why the local version of my file would indicate it was 1 second newer than the server version when I just tried to edit the file? I assume that you didn't download the file at all because you see a cached version that's newer, but how did a cached version get on my computer that's exactly one second newer? I didn't put the local file there. smartFTP did. How could it have just put the file there 1 second earlier?

BTW, thanks for looking into this

Steve

SmartFTP downloads the file to a directory created in the temporary directory under your user (%TEMP%). The directory name is a hash value based on the favoriteid and the path. It means if you edit the same file twice it already exists in this temporary folder unless you manually delete it. This is the case even if you restart SmartFTP.

How can it be newer than the file on the server? If you stop the transfer queue, you also stop the file monitoring. So if you save any further changes in editor the file time will be newer than the one on the server. This can also happen if the file monitor is still running and active but SmartFTP never receives the "filechange" notification.

To overcome this problem enable the [x] always overwrite local file option.

Regards,
Mat


SmartFTP downloads the file to a directory created in the temporary directory under your user (%TEMP%). The directory name is a hash value based on the favoriteid and the path. It means if you edit the same file twice it already exists in this temporary folder unless you manually delete it. This is the case even if you restart SmartFTP.

How can it be newer than the file on the server? If you stop the transfer queue, you also stop the file monitoring. So if you save any further changes in editor the file time will be newer than the one on the server. This can also happen if the file monitor is still running and active but SmartFTP never receives the "filechange" notification.

To overcome this problem enable the [x] always overwrite local file option.

Regards,
Mat

Sorry if I'm beating a dead horse, but the fact is I didn't stop the queue, and I didn't save the file. The file was probably in the temp folder from another editing session, but more than several minutes before (in the case of the log) and several days before on other times this has happened.

I hope this information will help you identify the problem. In the meantime I do have the always overwrite option turned on but I'm sure other people are going to have this problem because that's not the default setting.

I'll do a little more experimenting and see if I can supply any other insights.

The other problem I mentioned still exists, and that has to do with monitoring. Once smartFTP has been running for awhile, monitoring fails. Just now I right clicked a file, Edit, the file is downloaded into my editor. I make a small change and save, but the file is not uploaded even though the "Monitoring" status is showing. If I quit smartFTP and restart it, things work fine for awhile then stop again. I'm using EditPlus, which I've been using in conjunction with smartFTP for over 4 years, and it's always worked fine until a smartFTP upgrade a few months ago.

Thanks again

Hello Steve ...

Please try to reproduce both problems and provide instructions on how we can do so as well.

Another user also experienced problem that the monitor suddenly stops working:
https://www.smartftp.com/forums/index.ph ... -in-files/

Thank you for your efforts.

Regards,
Mat