Hello Mahmut,
I can contribute example client code, catching HTTP timeouts for Perl
and C# (Java will work similary):
_Perl:_
do {
$res = undef;
eval {
$res = $client->call("waitFor", $jobiddata);
};
} while ($@ =~ /500 read timeout/);
_C#:_
/*
requires SoapLabSupport class from
http://genome.dkfz-heidelberg.de/menu/hobit/webservice-clients/csharp/domainsweep/SoapLabSupport.cs
*/
string jobid = service.createAndRun(indoc);
//SoapLabSupport.waitForCompleted(service, jobid, true);
SoapLabSupport.ignoreTimeOut(service.waitFor, jobid, true);
Tstatus status = service.getStatus(jobid);
/* ignoreTimeOut() and waitForCompleted() try to solve the same task with
* with two different technologies:
* Goal is to ignore HTTP-timeouts while waiting for a job to complete.
* In order to ignore the timeout, the thrown exception need to be analysed, and in
* case of a timeout, ignored. Then the original method need to be reinvoked.
*
* ignoreTimeOut() uses a function/method delegate to solve this problem in a general level.
* waitForCompleted() uses reflection to do the waiting (more complicated than delegates).
*/
Best regards,
Peter
On 15.01.2009 10:54, ul...@eb... wrote:
> Hi,
>
> I have recently learned that we need to be more cautious when using
> runAndWaitFor and the waitFor methods in Soaplab interface. Soaplab web
> applications by default has a connection timeout setting of 5 minutes.
> Also some Soaplab servers may have load-balancer layers that may in turn
> have a maximum reply time setting, as for the EBI Soaplab server. In my
> recent experiences with jobs requiring time longer than the maximum reply
> time setting of the EBI Soaplab server the error messages returned after
> the maximum reply time was not clear enough to reveal that my waitFor
> calls was returning due to maximum reply time timeout.
>
> If you were getting error messages for your Soaplab calls after waiting
> couple of minutes and the error messages was not clear enough to
> understand the reason then it is possible that your calls may have been
> interrupted due to one of the timeout settings. If you want to make sure
> that you don't want to hit timeout limits an alternative would be to use
> createAndRun->getStatus->getResults series of calls rather than the
> createAndRun->waitFor calls or the runAndWaitFor call.
>
> Regards,
> Mahmut
>
|