Anyone noticing stalled uploading? find a solution?

Dave Cragg dave.cragg at lacscentre.co.uk
Fri Nov 9 17:43:52 EST 2007


On 9 Nov 2007, at 21:52, Josh Mellicker wrote:

> I am uploading a list of files.
>
> After uploading a few files with no problem, uploading "stalls"  
> with no progress, and no timeout message is sent.

Are you monitoring the error status with libURLSetStatusCallback.  
This won't properly indicate a timeout. (This came up on the list  
recently.) Depending on how you are uploading the files, the ways to  
check for a timeout are:

1. If using "put ... into url ..." or "post ... to url ..."

Check the result immediately after the put/post statement.

2. If using libUrlFtpUpload or libuUrlFtpUploadFile

Use the message callback parameter in either of these commands.


>
> The first thing I tried was implementing a "red light/green light"  
> to make the upload blocking, so the second file would wait (with  
> messages) for the first file to successfully finish uploading  
> before proceeding, and so on. This seemed to help a little, but  
> uploading still stalls intermittently.

Depending on how you do this, there may be a problem. You should  
avoid using "wait" while any libUrl stuff is going on. If using put  
or post, you can just use a standard repeat loop. Check the result  
after each call and then do the next one. If using libUrlFtpUpload,  
you can use the callback message to trigger the next upload.

> In theory, this sounds good, but so far, we haven't been able to  
> get the "resetAll" to work...

If using "libUrlResetAll", be careful. You shouldn't follow it  
immediately with new libUrl calls. It's best to let some kind of idle  
time occur first. Using "send ... in " to trigger the new set of  
uploads should work.

Of course, there could be some other wonky stuff going on. :-)

Cheers
Dave



More information about the use-livecode mailing list