intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
241 stars 240 forks source link

ERROR: cURL error during making API call. cURL Error Number:[28] #474

Open bondarenko93 opened 1 year ago

bondarenko93 commented 1 year ago

I've been seeing this error lately and don't know how to fix it. ERROR: cURL error during making API call. cURL Error Number:[28] with error:[Resolving timed out after 15000 milliseconds] {"exception":"[object] (QuickBooksOnline\API\Exception\SdkException(code: 0): cURL error during making API call. cURL Error Number:[28] with error:[Resolving timed out after 15000 milliseconds] at /home/sppinventory/public_html/laravel/vendor/quickbooks/v3-php-sdk/src/Core/HttpClients/CurlHttpClient.php:112) [stacktrace]

dreamwerx commented 1 year ago

I landed with with a similar timeout error. But you're seems to be more related to DNS lookup my guess. Check the DNS servers you're using that they can resolve whatever endpoints the SDK is connecting to. My timeout is a read timeout - which means it got past the resolution stage.

loriel commented 1 year ago

https://github.com/intuit/QuickBooks-V3-PHP-SDK/blob/20ce804a7e643d91b0a8f115e969bf6a0713f64e/src/Core/HttpClients/CurlHttpClient.php#L57

You can increase timeout define('QUICKBOOKS_API_TIMEOUT', 30); This is ugly way I hope someone has time to change SDK to make client options configurable.