7

我使用 WordPress,最近我将我的站点从 cpanel 主机移动到了带有 directadmin 面板的 Linux 服务器。转账后马上发现客户通过EDD插件下载时出现如下错误。

cURL 错误 28:5001 毫秒后解析超时

我也收到了 w3_total_cache 插件的这个错误。

服务器信息:Centos 6.8 (Final) cURL 7.54.0 (Final) directadmin

4

5 回答 5

2

cURL error 28: Resolving timed out after 5001 milliseconds意味着DNS resolving failed

所以只需更改/etc/resolv.conf中的 DNS 服务器列表。

或者我们可以在/etc/hosts中绑定主机名和 IP 地址。

此图像显示演示。

curl 解决超时

于 2019-04-24T16:53:58.723 回答
0

如此处报道: https ://wordpress.org/support/topic/dropbox-upload-fails-with-curl-timeout-error/ 您可以应用此临时修复来延长 HTTP 请求超时:

add_filter( 'http_request_timeout', function( $timeout ) { return 60; });

Wordpress 默认为 5 秒。

于 2021-12-22T12:57:14.513 回答
-1

要解决此问题,您必须在 curl 初始化时设置 curl 连接超时和超时值。
只需更改这两个属性值。

CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_TIMEOUT => 60,

有关更多详细信息,请查看

于 2018-05-10T11:13:52.667 回答
-1

在此处更新这两行: /usr/share/icingaweb2/modules/jira/library/Jira/RestApi.php

    $opts = array(
        CURLOPT_URL            => $this->url($url),
        CURLOPT_HTTPHEADER     => $headers,
        CURLOPT_USERPWD        => $auth,
        CURLOPT_CUSTOMREQUEST  => \strtoupper($method),
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CONNECTTIMEOUT => 30,
        CURLOPT_TIMEOUT => 30,
于 2020-09-29T21:57:18.677 回答
-2

您可以设置 set_time_limit(120); MySQL 设置部分之后的wp-config.php中。

于 2020-04-18T10:45:56.250 回答