(错误代码 28)5000 毫秒后解析超时 Ubuntu 服务器 - DNS?

(错误代码 28)5000 毫秒后解析超时 Ubuntu 服务器 - DNS?

意图:

我正在尝试使用 cUrl 以编程方式通过 SSH 将图像加载到 XAMP 中的 Prestashop 中。

我尝试过的:

我查看了一下,问题可能出在服务器的设置上。

我尝试更改文件中、、php.ini的值,但没有成功。max_execution_timememory_limitmax_input_varsmax_input_time

我尝试访问ping我收集图像的网站:

ping brandsdistribution.com
PING brandsdistribution.com (109.233.123.248) 56(84) bytes of data.

并一直运行直到我按下键中断它并返回:

--- brandsdistribution.com ping statistics ---
135 packets transmitted, 0 received, 100% packet loss, time 137194ms

如果我ping访问 google.com:

ping google.com
PING google.com (172.217.168.206) 56(84) bytes of data.
64 bytes from ams16s32-in-f14.1e100.net (172.217.168.206): icmp_seq=1 ttl=53 time=56.4 ms
64 bytes from ams16s32-in-f14.1e100.net (172.217.168.206): icmp_seq=2 ttl=53 time=47.6 ms
64 bytes from ams16s32-in-f14.1e100.net (172.217.168.206): icmp_seq=3 ttl=53 time=43.7 ms
64 bytes from ams16s32-in-f14.1e100.net (172.217.168.206): icmp_seq=4 ttl=53 time=80.0 ms
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 43.747/56.940/80.002/14.079 ms

问题

这是 DNS 问题吗?我该如何修复它?

错误信息

(1/1) Exception
file_get_contents_curl failed to download https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg : (error code 28) Resolving timed out after 5000 milliseconds

in Tools.php line 2162
at ToolsCore::file_get_contents_curl('https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', 5, null)

in Tools.php line 2235
at ToolsCore::file_get_contents('https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', false, resource)

in Tools.php line 2294
at ToolsCore::copy('https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', '/var/www/html/img/tmp/ps_importTmA1vB')

in productCreate.php line 107
at copyImg('68', '157', 'https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', 'products', false)

in productCreate.php line 66
at addImage(object(Product), 'https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', true)

in productCreate.php line 44
at createProduct(array('PRODUCT', '107510', 'Nike', 'W-ZoomGravity', 'BQ3203-006_W-ZoomGravity', '18', '101.00', '81.00', '57.00', 'Genere:Donna - Tipologia:Sneakers - Tomaia:materiale sintetico, materiale tessile - Interno:materiale sintetico, materiale tessile - Suola:gomma', '2.00', 'https://www.brandsdistribution.com/prod/stock_product_image_107510_1178872247.jpg', 'https://www.brandsdistribution.com/prod/stock_product_image_107510_2136019726.jpg', 'https://www.brandsdistribution.com/prod/stock_product_image_107510_1040197763.jpg', 'Vietnam', 'Nike', '', '', '', 'Scarpe', '', 'Sneakers', '', '', 'Continuativi', 'Rosa', '', 'pink,dimgray', 'Donna', '', '', '', '', ''))
in productCreate.php line 22

规格

  • Ubuntu 服务器 20.04
  • PHP 7.2
  • mysql 15.1 发行版 10.3.22-MariaDB

编辑:

  1. 我的名称服务器是 127.0.0.53

答案1

我在 2023 年 3 月 14 日尝试使用 php v7.2.30 在 MAMP 上安装 PrestaShop v1.7.6.7 时遇到了同样的问题

除了增加 max_execution_time 之外,我还启用了 Opcache 并且终于成功了!

相关内容