Closed xqsit94 closed 4 years ago
The timeout is currently 10 seconds, which should be long enough. What are you trying to do?
If you really need a longer timeout, you can inject a customized Guzzle client into the MollieApiClient.
Every single api takes more than 10s to respond you can see it in attached screenshot. How could you say it is long enough? Server response time is not same across the world.
I understand.
As a default setting, the 10s is fine. Further increasing the timeout may cause issues in other integrations. Also note that Mollie is only available to European merchants, and for legal reasons (GDPR) their servers generally need to be in Europe.
Again, if you need a longer timeout, you can inject a customized Guzzle client into the MollieApiClient constructor:
$timeout = 20; // or 30, whatever you need
$guzzleClient = new Client([
\GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getBundledCaBundlePath(),
\GuzzleHttp\RequestOptions::TIMEOUT => $timeout,
]);
$mollie = new MollieApiClient($guzzleClient);
$mollie->setApiKey(/*...*/);
// Ready to go
$mollie->payments->page();
Hi @xqsit94. Can you let me know where in the world you are operating from?
@sandervanhooft Thanks for your response. I injected that already, I'm working for an European client the response time of server is 15+ seconds here and I'm operating from India @willemstuursma .
Note that this reminds me of https://github.com/mollie/mollie-api-php/issues/414
Thanks @xqsit94. That's an insane slowness.
Can you post a traceroute here:
traceroute api.mollie.com
Maybe that will clear up where this slowness is coming from.
Specifications
Describe the issue
I get this following error due to timeout of 10 seconds
cURL error 28: Resolving timed out after 10000 milliseconds
Increase the curl timeout to at-least 20 - 30 seconds which is added in this PR #291