akamai / NetStorageKit-PHP

Akamai NetStorage for PHP
http://developer.akamai.com
Apache License 2.0
18 stars 19 forks source link

Timeouts when using the default 10s of the Edge client #8

Open lookaflyingdonkey opened 7 years ago

lookaflyingdonkey commented 7 years ago

When creating the client in the example $client = new \Akamai\Open\EdgeGrid\Client([ 'base_uri' => $host, 'handler' => $stack ]);

it may be worth putting a timeout example there too like

$client = new \Akamai\Open\EdgeGrid\Client([ 'base_uri' => $host, 'handler' => $stack, 'timeout' => 0 ]);

With the default 10s defined in https://github.com/akamai-open/AkamaiOPEN-edgegrid-php-client/blob/0.3.0/src/Client.php#L41 it pretty much means any files greater than a couple hundred kb cause it to fail.

I noticed in the new 1.0.0 beta1 of the EdgeGrid client it is set to 300 (5 minutes), which is better, but still may be worth putting an example with no timeout.

Cheers, Dean

NoodlesNZ commented 6 years ago

Thank you! I was pulling my hair out trying to work out why some of my files weren't making it to NetStorage. Increased the timeout to 300s and it's all working now.