Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Any way around "timed out while receiving stream" error
Thu, Sep 8 2016 6:52 AMPermanent Link

Adam Brett

Orixa Systems

I have quite a large BKP file to download, and then install onto a client computer.

The process is happening over a LAN, sometimes over WIFI, not under my control, and the WIFI seems to drop out from time to time.

I am using an EDBSession.Execute('COPY FILE ...'); command, as I am copying from a REMOTE store, the client computer does not have file-based access to the Bkp file over the LAN.

In a good number of cases the COPY fails with "timed out while receiving stream" error, this isn't an EDB issue.

I can block the whole thing in a try-except and retry, (and retry ...) the COPY but I am not sure this is the best thing to do, I would prefer to continue the first COPY somehow.

It is likely that a lot of the BKP file _has_ been transferred in the first call the COPY prior to the error. It seems stupid to restart the whole process, rather than continuing from the point it broke off.

Is there any way to do this? Or anyway to "bump" an EDBSession.Execute to continue despite this error?
Thu, Sep 8 2016 7:04 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< Is there any way to do this? Or anyway to "bump" an EDBSession.Execute to continue despite this error? >>

You want this event:

http://www.elevatesoft.com/manual?action=viewevent&id=edb2&product=rsdelphi&version=XE&comp=TEDBSession&event=OnRemoteTimeout

Just set a flag in your application that says "I'm copying this big file", and check it in an event handler for the OnRemoteTimeout event.  If the flag is set, then always set the StayConnected var parameter to True.  You might also want to add a catch for situations where the OnRemoteTimeout gets called X number of times within the scope of such an operation, and go ahead and set StayConnected to False in such a case.  That will avoid an endless wait on a response that is never coming.  It's an edge case, but that's why they pay us the big bucks. Wink

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Sep 8 2016 10:39 AMPermanent Link

Adam Brett

Orixa Systems

Thanks Tim

After this long with EDB I should know this stuff!
Image