I am using the Amazon API to upload listings and pretty much all of the time it works but every now and again I get the following error:
SSL_write() error: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry
Like I say the script works most of the time, the xml is valid and after days of googling the error message I can't find why this is happening.
The following is the code I am using which throws the error:
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HTTPHEADER, $http_header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
$response = curl_exec($ch);
print curl_error($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Has anyone come across this problem before that may be able to help or help me understand why the error is happening?
Thank you