I'm 99% sure this is a misconfiguration or a problem on the server side, but I'm not sure how to deal with it. Some uploads are hanging indefinitely. They will continue running for days with no data being transferred. Even when I lower the timeout to 120 seconds.
In looking at the Chilkat sftp debug file I see a keepalive message is being sent. I can't tell if it's coming from the client or the server. Below is what I assume is the relevant section of the log. I don't know why the transfer stops and this keepalive thing starts happening. I doubt the server administrators are going to cooperative in helping me debug it. I just want a way to detect when the situation is happening and have the transfer fail. I can log an error and recover if I can detect the situation occurring. My current line of thinking is that I set EnableEvents and KeepSessionLog equal to true and then check the SessionLog string for "firstname.lastname@example.org" in the OnAbortCheck. Existence of that substring would start a timer and I would abort the process after n seconds of continued inactivity.
I guess my question is, is there an easier way to detect this scenario? Are there some settings I could change to avoid it in the first place? Again, setting the timeout properties doesn't seem to help.
One other note is that when this happens the OnPercentDone event seems to stop firing.
Following is the log:
asked Dec 18 '12 at 16:15
No Chilkat method call should ever hang indefinitely, unless one of the timeout related properties is set to 0 to indicate that waiting forever is the intended behavior.
The first thing to do is to verify that the timeout related properties are not set to 0. These are the ConnectTimeoutMs and IdleTimeoutMs properties. If your app explicitly sets these properties to 0, then it is asking for an infinite wait time and the app can hang.
The 2nd thing to check is that maybe the timeouts are set to a long amount of time, or even the default of 30 seconds (30,000 ms) and maybe what seems to be an indefinite hang is something that would eventually return.
The 3rd thing to verify is that the hang is not occurring within your app code inside an event callback.
Finally, if Chilkat is truly hanging, then the way to get more information is via the DebugLogFilePath property, which is common to all Chilkat classes.
answered Dec 19 '12 at 10:22