1

I already looked here: Curl request is failing on the SSL?

My extension is turned on and I even have curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, 0);

I will get this error maybe one in a thousand requests to two different services that are unrelated. Since it's so incredibly rare and I can't reproduce it I was wondering if anyone has had a similar situation. I noticed a lot of posts on here are about specific services, but this one is not.

Community
  • 1
  • 1
Dave Stein
  • 8,653
  • 13
  • 56
  • 104

1 Answers1

1

This probably has more to do with what is hosting your remote resource, than how you are accessing it. In any case, you can simply handle this exception and try again. Just be sure to log when you do, so that you can track this issue.

Also, don't retry indefinitely. If there is a real problem you can solve, you don't want processes running forever. One retry should be enough.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • I've gotten that suggestion a few times and am scared to try it - esp for one of the services which has to do with charging people. It might be the one I have to try though at some point. – Dave Stein Jun 11 '12 at 18:16
  • @DaveStein, We have the exact same issue. Log everything. Make sure you are only handling the exceptions that you intend to handle. Finally, the service on the other side should have a mechanism for keeping you from doing the same transaction twice. If it does not, modify it if it is under your control, or switch to a better provider that does. – Brad Jun 11 '12 at 18:19
  • 1
    Better late than never to flag this as answer :) – Dave Stein Aug 08 '12 at 20:24