php curl exec 慢,curl命令行请求并不慢,但php curl_exec很慢,怎么回事?

问题:如题。

curl "http://xxx.com.cn/api/open" --data "access_token=4CC7D18986B8987663E57F3CA0A87198&once=cSTvPM2h9lts&timestamp=1464951645705&sign=2da0302f6aa7b01a5cfa964d818109df&version=1.0&format=JSON&sign_type=MD5&attach=&method=open.jewelStatus.modify&data="%"7B"%"22orderId"%"22"%"3A"%"22413"%"22"%"2C"%"22status"%"22"%"3A100"%"2C"%"22operation"%"22"%"3A2"%"7D" --compressed

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 400 0 118 100 282 77 184 0:00:01 0:00:01 --:--:-- 186{"attach":"","errmsg":"","result":"{}","sign":"0ec35efd5c6500baa566937950a9cb40","status":"1000","timestamp":"1465006446020"}

$url = Yii::$app->params['erp_api']['url'];

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// post数据

curl_setopt($ch, CURLOPT_POST, 1);

// post的变量

curl_setopt($ch, CURLOPT_POSTFIELDS, $params);

$output = curl_exec($ch);//**<=Maximum execution time of 30 seconds exceeded**

curl_close($ch);

但是,诡异的是,我用xdebug跟踪,其实是可以跑通的。。

有没有遇到这个问题的。求解,谢谢!