0
My problem is that depending on the size of the JSON
sent, the request CUrl
does not work, ie I send 2 photos on JSON
, right, but 4 is already reason for a TimeOut
.
The problem is not in API
for in the Postman
works regardless of the size of the JSON
, I mean, I think it’s some configuration that I’m not setting, someone has some idea?
Structure of the Curl...
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => trim($this->vg['url'] . $url1 . $url2),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_POSTFIELDS => $json,
CURLOPT_HTTPHEADER => array(
"Cache-control: no-cache",
"Accept: application/json",
"Content-type: application/json",
),
));
I had already tried that didn’t solve
– Felipe Duarte
Is your server enabled to reconfigure running by php? What error is displayed?
– Wilson Faustino
Dude... the Curl timeout is in 30seconds (CURLOPT_TIMEOUT => 30), already tried to increase it also to CURLOPT_TIMEOUT => 1800?
– Wilson Faustino
Yes kkk, I increased to the maximum, just stays in an infinite looping, I just increase the json a little and it’s gone
– Felipe Duarte
Strange... I’ve used php Curl to send up to 4GB and it worked.
– Wilson Faustino