Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Updating gives CURL timeout...

Sebastian Di Luise   ( User )

Commented 4 years ago

 


Seems that my hosting provider takes more time to download the update package from within the Akaunting update function.  I think its my hosting provider, but would it be possible to give CURL download more time to download?


 


Thanks,





Whoops, looks like something went wrong.





 




















(1/1) ConnectException


cURL error 28: Operation timed out after 30002 milliseconds with 13560576 out of 28231420 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)


in CurlFactory.php line 185
at CurlFactory::createRejection(object(EasyHandle), array('errno' => 28, 'error' => 'Operation timed out after 30002 milliseconds with 13560576 out of 28231420 bytes received', 'url' => 'https://akaunting.com/api/core/download/1.2.3/7.0.19/5.7.18', 'content_type' => 'application/zip', 'http_code' => 200, 'header_size' => 373, 'request_size' => 223, 'filetime' => -1, 'ssl_verify_result' => 0, 'redirect_count' => 0, 'total_time' => 30.717451000000001, 'namelookup_time' => 0.0016490000000000001, 'connect_time' => 0.23436000000000001, 'pretransfer_time' => 0.71477999999999997, 'size_upload' => 0.0, 'size_download' => 13560576.0, 'speed_download' => 441461.0, 'speed_upload' => 0.0, 'download_content_length' => 28231420.0, 'upload_content_length' => 0.0, 'starttransfer_time' => 1.108903, 'redirect_time' => 0.0, 'redirect_url' => '', 'primary_ip' => '139.162.160.225', 'certinfo' => array()))in CurlFactory.php line 149
at CurlFactory::finishError(object(CurlHandler), object(EasyHandle), object(CurlFactory))in CurlFactory.php line 102

Ritche Ramos   ( User )

Commented 4 years ago

To resolve this is this is what I did.


 


Went to \vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php


Then changed this part:


        if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
            $conf[CURLOPT_NOSIGNAL] = true;
        }


with


 


        if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 30)) !== 'WIN') {
            $conf[CURLOPT_NOSIGNAL] = true;
        }


 


Hope this helps..

Sebastian Di Luise   ( User )

Commented 4 years ago

Thanks Richie, I tried with 30, 300... but no luck, the timeout is the same, it downloads about the same bytes, about 23500000 as maximum.  Will try to update by uploading manually.


Thanks!

Please login or register to leave a response.

Showing 1 to 3 of 3 discussions