为什么我会随机接收“未知SSL协议错误”从CURL?

问题描述:

我已经在这里查看了:
Curl请求失败SSL

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

我的扩展程序已打开,我甚至还有 curl_setopt($ curl,CURLOPT_SSL_VERIFYHOST,0);

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.

什么是托管您的远程资源,而不是如何访问它。在任何情况下,您只需处理此异常,然后重试。只要确保在您这样做时记录,以便您可以跟踪此问题。

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.