0

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

Dan
  • 103
  • 1
  • 13
  • Hi binnyb, I have seen this post but unsure how to correct it.It works when I limit the amount of products to be sent up in the feed to 20 but anymore than that and it fails. Sometimes however, it will work with thousands – Dan Feb 17 '16 at 16:52
  • what version of curl is php using? easily seen in the output of `phpinfo()` – james Feb 17 '16 at 19:32
  • Hi, Apologies for the late response. Under Curl Information it says version 7.38.0 – Dan Feb 23 '16 at 16:16

0 Answers0