Retrieving IBM Watson Links "Forwarding Failed" (status_code 500)

I am sending some of the text to the IBM / Watson Relationship Retrieval Service, but I get the following response after about 90 seconds:

{"status": {"message": "Forwarding error", "status_code": 500}}

Most small files work fine and results are expected. However, this file is large (200K).

Here's my code:

set_time_limit(0);

$curl = curl_init();
$post_args = array(
'txt' => $data,
'sid' => 'ie-en-news',
'rt' => 'json' 
);

curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_args);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_URL, "https://gateway.watsonplatform.net/relationship-extraction-beta/api/v1/sire/0");
curl_setopt($curl, CURLOPT_USERPWD, "XXXXXXXXXXXXX:XXXXXXXXXXXXX");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT ,0);
curl_setopt($curl, CURLOPT_TIMEOUT, 600); 

$result = curl_exec($curl);
curl_close($curl);

$decoded = json_decode($result, true);
echo "RESPONSE: [<Br/><pre>$result</pre><br/>]";

      

I tried increasing the timeout values ​​using set_time_limit()

, CURLOPT_CONNECTTIMEOUT

and CURLOPT_TIMEOUT

, but it didn't matter.

+3


source to share


1 answer


This is an internal error where the service (in this case Visual Recognition) cannot be found so that the load balancer will return an http status forwarding error.
It was probably a network glitch, the service is now working fine.



0


source







All Articles