Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: session timeout when putting files

Thanks for your report.

This issue is being discussed and investigated for example here:
https://winscp.net/forum/viewtopic.php?t=12091

Note that it has nothing to do with a session log (Session.SessionLogPath) nor debug log (Session.DebugLogPath).

I'll contact you soon for more details.
Akarius

If you want to see if it's a permission issue, try process monitor from microsoft sysinternals while running your app.
You should add a filter for winscp as you'll have a lot of logs in it.
Alternatively, you could add a filter to only see logs about your log file (C:\WinSCP.log)
gholmes

OK, so in today's daily run it failed. Same error. Grr.

6/28/2013 5:41:21 AM
System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\WinSCP.log was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)


This is totally intermittent ... so not seeing how it's an error in my programming. Or a permissions issue.

Frustrating.
Akarius

Good for you! :)

I can't do this as I have about 400 files each hour to upload, it'd be too time and process consuming.
gholmes

gholmes wrote:

I'm going to try uploading the files individually (I was uploading a directory with some large files).

I will report whether this change makes any difference.


Well, this new way worked this morning ... of course, it runs once per day, so this is just a one-day sample so far :)
gholmes

Akarius wrote:

It seems the assembly uses the temp dir as a buffer for the log.


Yes ... because when it does work, it deletes the file anyway!
Akarius

gholmes wrote:


Well, when I didn't give a value, it created a weirdly named file in a temp directory ("Log file C:\Documents and Settings\Administrator\Local Settings\Temp\wscp0A68.0202C666.tmp was not created in time"). Had the exact same issues ...



Weird, nonetheless it's in the doc...
string DebugLogPath Path to store assembly debug log to. Default null means, no debug log file is created. See also SessionLogPath. The property has to be set before calling Open.

string SessionLogPath Path to store session log file to. Default null means, no session log file is created. See also DebugLogPath. The property has to be set before calling Open.


It seems the assembly uses the temp dir as a buffer for the log.
gholmes

Akarius wrote:

If you don't give a value to Session.SessionLogPath, I think there'll be no log.


Well, when I didn't give a value, it created a weirdly named file in a temp directory ("Log file C:\Documents and Settings\Administrator\Local Settings\Temp\wscp0A68.0202C666.tmp was not created in time"). Had the exact same issues ...



Akarius wrote:

You should try to specify a non-system path instead of C: or temp. Create a dir with the same user as you run the app and log there.

Just my 2 cents :D


At this point, I'll try anything ... if my "upload each file individually" experiment doesn't work, I'll give that a try :)
Akarius

If you don't give a value to Session.SessionLogPath, I think there'll be no log.

You should try to specify a non-system path instead of C: or temp. Create a dir with the same user as you run the app and log there.

Just my 2 cents :D
gholmes

I'm going to try uploading the files individually (I was uploading a directory with some large files).

I will report whether this change makes any difference.
gholmes

session timeout when putting files

(I originally posted this in the general support forum)

"Timeout waiting for WinSCP to respond ... was not created in time" error.

It's intermittent. It doesn't matter whether I specify a path or not. And obviously the scheduler user *does* have write permission, since it works [i]sometimes[/i].

Can I just turn off logging? I just want this to plain work. Frankly, this is the only error I've been getting :)

Is there a way to just turn off logging, using the .NET assembly?


I run it from Windows Task Scheduler once per day.

Obviously the user it runs under does have write permission ... as it works some days, but not others.


Here's an example of the errors:

WITHOUT CUSTOM PATH:
6/21/2013 5:34:38 AM
System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\Documents and Settings\Administrator\Local Settings\Temp\wscp0A68.0202C666.tmp was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)



WITH CUSTOM PATH:
6/24/2013 5:34:10 AM
System.TimeoutException: Timeout waiting for WinSCP to respond - Log file C:\WinSCP.log was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)