Coder Social home page Coder Social logo

Comments (8)

Exeu avatar Exeu commented on May 26, 2024

Hi,

which version are you using?

from amazon-ecs-php-library.

markdwhite avatar markdwhite commented on May 26, 2024

v1.3.1...aha, we're now at 1.3.2...

I can only see new locales and code cleanup. Is there any other potential benefit from upgrading? I'll have to wait through a release deployment cycle to know if it does solve the issue if I do upgrade.

from amazon-ecs-php-library.

Exeu avatar Exeu commented on May 26, 2024

No there is no benefit only the locale has been added.

I tested the lookup functionallity with version 1.3.1 and there are no problems for me.
So currently im not able to reproduce this error you're getting.

The function call youve implemented is correct:
$response = $amazonEcs->responseGroup('Large')->lookup($ASIN);

Interesting is the first part of the StackTrace:

PHP Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /var/www/booklending/lib/AmazonECS.class.php:229\nStack trace:\n#0 [internal function]: SoapClient->doRequest('<?xml version="...', 'https://webserv...', 'http://soap.ama...', 1, 0)\n#1

Could you try to get some more information according to the URLs which are displayed there?
Maybe there is the error.

And could you also try to test the class on your system with the sampleItemLookup.php ?
Is there also an Exception Thrown when you run this example file?

Thanks

from amazon-ecs-php-library.

markdwhite avatar markdwhite commented on May 26, 2024

Thanks for following up.

I'd increased the logging and have a little more information. The code centers around some page scrapers which are being run regularly. Usually, this particular one runs in less than a minute. The webserver access logs show that it actually took 2 mins to return. Could this possible be a timeout error?

AmazonECS is being instantiated in the standard way, using constants, like so:
$amazonEcs = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, 'com', AWS_ASSOCIATE_TAG);
$amazonEcs->setReturnType(AmazonECS::RETURN_TYPE_ARRAY);

I can provide any information that might help to track this down, but I'm unsure how to best do this. Should I just dump $webserviceWsdl and $webserviceEndpoint to a logfile before #229 "return $soapClient->__soapCall($function,array($params));". or would you suggest something else.

No problems when I use sampleItemLookup.php, and this has been my only test so far - to take the ASINs that caused the error and test them in sampleItemLookup.php to see if they are causing the error to be thrown. And they don't. But this is a very occasional error - I'm calling this method thousands of times during the day, and yesterday saw just two of these errors.

So what should the best next steps be to help?

from amazon-ecs-php-library.

Exeu avatar Exeu commented on May 26, 2024

Hm..
Its possible that this is a timeout error.
Maybe the Webservice is so milliseconds not available for some reasons and this is why the request fails.
But i'm not sure.

It is very difficult to reproduce that.
Maybe try to refetch the product information when it fails by catching the exception and restart the procedure?

from amazon-ecs-php-library.

markdwhite avatar markdwhite commented on May 26, 2024

I understand it's not an obvious one...

So are you suggesting something like this? If so, sounds reasonable...

try {
$response = $amazonEcs->responseGroup('Large')->lookup($ASIN);
} catch (Exception $e) {
// Dump $e to log with retrying message
try {
$response = $amazonEcs->responseGroup('Large')->lookup($ASIN);
} catch (Exception $e) {
// Dump $e to log with failed message
}
}

from amazon-ecs-php-library.

Exeu avatar Exeu commented on May 26, 2024

Yes something like this.

If your running the product Lookup in a loop try to use the sleep function between the requests.
Maybe this also could help.

from amazon-ecs-php-library.

markdwhite avatar markdwhite commented on May 26, 2024

Sounds good. Thanks for following this one through - it's much appreciated

from amazon-ecs-php-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.