最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Laravel: The cURL request was retried 3 times and did not succeed - Stack Overflow

programmeradmin0浏览0评论

I am using Laravel's Http facade to call APIs. Since I have to call multiple APIs, I have created a job and called the APIs from the job. This is working in my local environmental, but when tested in a staging server, it is giving the following error.

GuzzleHttp\Exception\RequestException: cURL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong. See .php?id=47204 for more information. (see .html) for ;offset=0&sort=name%3Adesc in /var/lib/jenkins/workspace/sonar-iq/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:276

I have already set the follwing options to Http facade.

'verify' => false,'timeout' => 0,
'debug' => true,
'curl' => [
    CURLOPT_FORBID_REUSE => false,
    CURLOPT_FRESH_CONNECT => true
]

This issue is only happening while calling the APIs from the queue:work, when calling normally, the issue does not happen.

发布评论

评论列表(0)

  1. 暂无评论