Operation timed out after 10000 milliseconds with 4195499 bytes received

$request = Remote::get($url, $params);

the above is the error i get.

That means what is says, the request takes too long. You should handle such errors in your code. You could also try setting a longer timeout.

Hi, Thanks again,
2 findings
1.
curl_setopt($url, CURLOPT_TIMEOUT,0);
which i think needs to be set when doing a curl call, i think Kirby Remote method does that.

  1. in php.ini file
; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 360

which i have tried with no success. Any help will be highly appreciated.

i had to add
$this->curlopt[CURLOPT_TIMEOUT] = 0;
on line no: 220 remote.php but i dont think editing the internal kirby file is the solution to this issue? what are your views on this?

Definitely not! It will be overridden on update, anyway. As I mentioned above, you should set the value in the options you pass to the function. The default value is 10 seconds.

Nevertheless, whatever you set the timeout to, you should handle such errors in a try/catch block.

yes, i will check for the same. i saw it takes parameters. Thanks a lot.

anyone who needs a workaround…

$params['timeout'] = 0;
$request = Remote::get($url,$params);

this will set the response timeout to infinite :smiley: do same for post request too. YES THIS IS HACKS :shushing_face: