I had an issue where every 9 out of 10 requests the connection would time out with the following error:
http: external request POST url=https://1234567.web.cddbp.net/webapi/xml/1.0/, timeout=20000 exception: code=2001, message=Request to a Gracenote WebAPI timed out., ext=0
Fatal error: Uncaught exception 'Gracenote\WebAPI\GNException' with message 'Request to a Gracenote WebAPI timed out.' in /usr/samba/dev/gracenote/php-gracenote/php-gracenote/HTTP.class.php:110 Stack trace: #0 /usr/samba/dev/gracenote/php-gracenote/php-gracenote/HTTP.class.php(94): Gracenote\WebAPI\HTTP->validateResponse(false) #1 /usr/samba/dev/gracenote/php-gracenote/php-gracenote/HTTP.class.php(144): Gracenote\WebAPI\HTTP->execute() #2 /usr/samba/dev/gracenote/php-gracenote/php-gracenote/Gracenote.class.php(59): Gracenote\WebAPI\HTTP->post('<QUERIES>? ...') #3 /usr/samba/dev/gracenote/php-gracenote/example.php(31): Gracenote\WebAPI\GracenoteWebAPI->register() #4 {main} thrown in /usr/samba/dev/gracenote/php-gracenote/php-gracenote/HTTP.class.php on line 110
The reason ( i suspect) is the missing SSL version parameter for the curl connection.
I was able to fix by adding this to line 38 in HTTP.class.php.
curl_setopt($this->_ch, CURLOPT_SSLVERSION, 3);