내 웹 사이트와 파트너 웹 사이트간에 데이터를 전송할 때 cURL을 사용하고 있습니다.php cURL - 느린 업로드 한도 - 최적화하는 방법?
요청이 매우 길지만 (~ 18 초), 정보량은 아주 적습니다 (~ 207 바이트). curlinfo 문서에
17.418212 total_time : Total transaction time in seconds for last transfer
0.064612 namelookup_time : Time in seconds until name resolving was complete
0.437222 connect_time : Time in seconds it took to establish the connection
0.946509 pretransfer_time : Time in seconds from start until just before file transfer begins
17.418172 starttransfer_time : Time in seconds until the first byte is about to be transferred
0 redirect_count : Number of redirects
0 redirect_time : Time in seconds of all redirection steps before final transaction was started
207 size_upload : Total number of bytes uploaded
11 speed_upload : Average upload speed
130 size_download : Total number of bytes downloaded
7 speed_download : Average download speed
: 여기
// Send the subscription
$resource = curl_init($url);
curl_setopt($resource, CURLOPT_RETURNTRANSFER, true);
curl_setopt($resource, CURLOPT_POST, count($postFields));
curl_setopt($resource, CURLOPT_POSTFIELDS, $postString);
$result = curl_exec($resource);
이 (가) curlinfo 디버그의 결과입니다 : 여기
요청 생성하려면 코드입니다
http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html를, 그것이라고 그 size_upload 및 speed_upload 바이트와 초당 바이트 수입니다.
매우 빠르지 않습니까? 다른 디버그 정보는 어디에서 찾을 수 있습니까?이 속도를 향상 시키려면 어떻게해야합니까?
추가 정보 : 데이터를 전송 및 수신 두 서버 좋은 대역폭 이 모두 그것은 서버 측에서 성능 문제처럼 보이는 같은 도시
1 컬링 호출을 디버깅 한 경우 +1. curl 문제가있는 대부분의 사용자는 curl_error()에 대해서조차 모른다. 스택 오버플로에 오신 것을 환영합니다! :) –
브라우저에서 요청을 할 때 요청이 얼마나 빠릅니까? 원격 스크립트가 데이터를 생성하는 데 17 초가 걸릴 수 있습니까? –
서버 측에서 성능 문제가있는 것 같습니다. – Kamil