How to raise exception immediately when upload target folder is full

Advertisement

poisson0106
Joined:
Posts:
4

How to raise exception immediately when upload target folder is full

Hi, I'm a new comer for the WinSCP script programming. Currently I'm using the PowerShell to do an uploading function using Session.PutFiles. But I meet a difficulty.
For example, I will uploading a 12G files to a 10G free space folder such as /home/foo/xxx use the "Resume" upload option. The uploading will continue till the 10G free space filled. But in this time, it doesn't raise exception immediately but still try to upload until almost one hour later. Then it raises error like
Exception calling "PutFiles" with "4" argument(s): "Timeout waiting for WinSCP to respond"
I wonder to know if there is a way to raise exception immediately when the space is full. If not, how can I set the upload timeout value to a short time?
Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: How to raise exception immediately when upload target folder is full

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

poisson0106
Joined:
Posts:
4

Hi I have attach the session log. I have upload a file which size is over target folder volume. And I add a method to monitor progress. The space is over when progress is 45, like following.
-Join Current progress 0.39 under speed 13655466
-Join Current progress 0.39 under speed 13956682
-Join Current progress 0.4 under speed 14171180
-Join Current progress 0.41 under speed 14342779
-Join Current progress 0.41 under speed 14404982
-Join Current progress 0.42 under speed 14557277
-Join Current progress 0.43 under speed 14718151
-Join Current progress 0.44 under speed 14861829
-Join Current progress 0.45 under speed 15036323
-Join Current progress 0.45 under speed 14996517
-Join Current progress 0 under speed 0
-Join Current progress 0 under speed 0
-Join Current progress 0.45 under speed 38874000
-Join Current progress 0 under speed 0
-Join Current progress 0 under speed 0
-Join Current progress 0.45 under speed 38874000
-Join Current progress 0 under speed 0
-Join Current progress 0 under speed 0
-Join Current progress 0.45 under speed 0
-Join Current progress 0 under speed 0
-Join Current progress 0 under speed 0

Then I ctrl+c the script. Please check. Thanks

Reply with quote

martin
Site Admin
martin avatar

The problem is that your server disconnects the session, instead of only failing the upload. So WinSCP keeps reconnecting, until it timeouts. All checks that would allow more graceful end of the transfer fail, as the reconnect always succeeds. So WinSCP still keeps seeing the problem as temporary.

Reply with quote

poisson0106

Hi Martin,
Thank you for your reply. Through your information, it seems that reconfigure server behavior is the best solution. But I haven't authority to change the server environment. Can I have a method to short the retry times? Or short the timeout time?
Thanks

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum