dpnvrt3119 2014-01-28 12:03
浏览 11

卷曲请求需要大约2分钟的时间,开发时间为1.2秒

Not sure if anyone can guide me in the right direction, but i have an extension in a Magento installation, which performs a curl request to "itself", but it performs the request to the full domain.

On my dev server (which is not dedicated to this site, and traffic roughly equals live), it takes the call roughly 1.2 - 1.4 seconds, every time.

But when i perform the same action on my live server it takes over a minute and a half, and frankly i have no clue as how to debug this.

It is not the database, even if i connect the dev to the live database server it takes the same time...

It is not the code, since the code base is exactly the same...

Is there anything else that can be causing an issue like this?

I would post the request, but it is over a 1000 lines...

  • 写回答

1条回答 默认 最新

  • dongpu2476 2014-01-28 17:11
    关注

    You didn't mention what it returns after 90-120 seconds of execution.

    You can run the script by setting some values with CURLOPT_CONNECTTIMEOUT option to check whether its the issue of connection to host or not.

    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,  10);
    

    If you find it takes less time after setting this option, then its surely the issue of connection between the host and your server.

    Also, you can run the script by enabling the curl debug mode as well.

    curl_setopt($ch, CURLOPT_VERBOSE,  true);
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大