Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:18

    aws-sdk-php-automation on master

    Update models for release 3.208.1 release (compare)

  • 19:18

    aws-sdk-php-automation on 3.208.1

    (compare)

  • 12:10
    BenHarris commented #2249
  • 12:10
    BenHarris edited #2249
  • 12:04
    BenHarris synchronize #2249
  • 08:42
    JorisDebonnet commented #2303
  • Dec 02 22:43
    dandrei commented #2356
  • Dec 02 22:43
    dandrei commented #2356
  • Dec 02 21:50
    SamRemis commented #2303
  • Dec 02 20:45
    SamRemis commented #2303
  • Dec 02 19:17

    aws-sdk-php-automation on 3.208.0

    (compare)

  • Dec 02 19:17

    aws-sdk-php-automation on master

    Update models for release 3.208.0 release (compare)

  • Dec 02 16:06
    JorisDebonnet commented #2303
  • Dec 02 12:56
    DieterHolvoet opened #2356
  • Dec 02 12:44
    DieterHolvoet opened #2355
  • Dec 02 12:44
    DieterHolvoet labeled #2355
  • Dec 02 12:44
    DieterHolvoet labeled #2355
  • Dec 02 08:16
    jokaorgua commented #2353
  • Dec 01 23:46

    aws-sdk-php-automation on master

    Update models for release 3.207.1 release (compare)

  • Dec 01 23:46

    aws-sdk-php-automation on 3.207.1

    (compare)

Robert Casanova
@robertcasanova
cURL resource: Resource id 54; cURL error: Could not resolve host: s3-eu-west-1.amazonaws.com (cURL error code 6). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.
does somebody have the same problem or some suggestion for this?
Jonathan Eskew
@jeskew
@YohaanYoon could you open an issue on GitHub with a code sample?
@robertcasanova that looks like an outbound networking issue. Are you sure the docker container hosting the app can contact the internet?
Robert Casanova
@robertcasanova
@jeskew thx for your answer. I tryed to reboot and then it works: it happens randomly. Probably, as you said, is something with docker. Thx.
mikemherron
@mikemherron
Hi - I've got a quick question about the automatic handling of ProvisionedThroughputExceededExceptions when writing items to DynamoDB - my understanding is that the SDK handles these automatically, but on my test server, I can see these are being thrown from the SDK. I'm intentionally trying to test this behaviour so I've provisioned a table with 1 Unit of Read Capacity and 1 Unity of Write Capacity, and have a script that will definitely exceed this. I suspect that I'm reaching some internal retry limit, but I've not been able to find documentation on this - can anyone point me to whereabouts in the code the retry logic is handled so I can confirm?
Jonathan Eskew
@jeskew
Dynamo calls are retired 11 times by default
mikemherron
@mikemherron
That's great, thank you for the pointer.
mikemherron
@mikemherron
@jeskew Another quick question if you have time? So I added the below line to RetryMiddleware.php:

$command['@http']['delay'] = $delay($retries++);

  • \Log::info("Retrying with delay:" . $command['@http']['delay'] );

return $handler($command, $request)->then($g, $g);

and observed the below output:
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0.05
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0.1
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0.2
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0.4
[2015-11-05 16:28:48] test.INFO: Retrying with delay:0.8
[2015-11-05 16:28:48] test.INFO: Retrying with delay:1.6
[2015-11-05 16:28:48] test.INFO: Retrying with delay:3.2
[2015-11-05 16:28:48] test.INFO: Retrying with delay:6.4
[2015-11-05 16:28:48] test.INFO: Retrying with delay:12.8
[2015-11-05 16:28:48] test.INFO: Retrying with delay:25.6
I assume the delays are in ms ?
Jonathan Eskew
@jeskew
I believe they're in seconds, though I'll have to check to be sure
The requests have an exponentially increasing delay between them
So that throttled requests will try again after the throttle has been lifted
mikemherron
@mikemherron
Ok thanks - from the timestamps recorded in my logs, it looks like the retries are all being logged at the same second.
In fact, thinking about it now, a retry of "0.05" ms probably doesn't make sense :)
Also, my test script definitely didn't show a delay at all - it just fails when my server returns the 500 due to the uncaught ProvisionedThroughputExceededException.
Jonathan Eskew
@jeskew
Oh so the delay is being calculated but not applied?
mikemherron
@mikemherron
That looks possible - I'm trying to look through the code now, but it's my first time through it so taking me a while!
Jonathan Eskew
@jeskew
Could you open an issue with that log on github?
Might help to get more eyes on it
mikemherron
@mikemherron
Sure
I can see in Waiter.php::getArgsForAttempt() the delay is multipled by 1000 with the comment " // Set the delay. (Note: handlers except delay in milliseconds.)"
I may be in the wrong place entirely, but I wonder if that scaling is being by-passed due to the way that the RetryMiddleware applies the delay
Of course, I might just be in the wrong place altogether.
Will log the issue now.
Jonathan Eskew
@jeskew
The waiter delay should be separate from the retry delay. I'll take a closer look and let you know
mikemherron
@mikemherron
Cheers, thanks a lot. I'm putting together a quick repro script.
mikemherron
@mikemherron
@jeskew Have added the issue: aws/aws-sdk-php#815
Daniel Hensby
@dhensby
Hi, I just opened issue #821 and have a patch at #822 but I'm not really experienced with mock objects so not sure how to write a robust test for this problem
can anyone give me some pointers?
I essentially want to write some data to one session ID, "change the session ID", save the session again, and then check the data was saved
Jonathan Eskew
@jeskew
You can provide an http_handler to a client that verifies expectations instead of making requests
Daniel Hensby
@dhensby
@jeskew thanks; are there any existing examples in the tests I can use as a reference?
Daniel Hensby
@dhensby
thanks, I'll take a look.
Daniel Hensby
@dhensby
@jeskew I'm trying to implement something similar to that example, but it doesn't seem to have the intended effect...
$store = array();
        $client = DynamoDbClient::factory(array(
            'region' => 'us-west-2',
            'http_handler' => function() use(&$store) {
                var_dump(func_get_args());
                echo 'here';
            }
        ));
        $handler = SessionHandler::factory(array(
            'dynamodb_client'  => $client,
         ));
(this is just for debugging) the http_handler never gets called
I am on the 2.8 branch... perhaps it's not available on v2?
Jonathan Eskew
@jeskew
It's not on 2.8
Daniel Hensby
@dhensby
:(
any other pointers on how I can test this, then?
Jonathan Eskew
@jeskew
The session handler tests have a getMockedClient method
That should let you mock out responses
Daniel Hensby
@dhensby
This message was deleted
This message was deleted