卷曲请求需要大约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...

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);