为什么我会随机接收“未知SSL协议错误”从CURL? [英] Why would I randomly receive "Unknown SSL protocol error" from CURL?

查看:189
本文介绍了为什么我会随机接收“未知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.

这篇关于为什么我会随机接收“未知SSL协议错误”从CURL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆