Amazon api keeps cancelling my request - amazon-mws

Everytime I ping amazon to get _GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA_ I can make the request and it SUBMITTED for about 10 seconds then when I ping again it says cancel I have tried making the request 3 times and all of the times it seems to get cancelled.

You are querying too much. For that particular report I request once an hour (the most you can) and if you get a cancel message have it wait an hour and then query again. It is initially hard to debug so I would keep around the exports to test your other portions of your code while keep the report download code separate.

Related

Office 365 Management API activity/feed/subscriptions APIs returning InternalServerError

Am researching activity audits for the last couple days using an asp.net MVC project. I was using contentType=Audit.Exchange and contentType=Azure.ActiveDirectory successfully since the last half of yesterday and this morning up until about two hours ago.
I made no changes to my authorization/authentication code and the tokens look good. Also no changes to the calls themselves. I added some json handling for the response to list subscriptions and when I ran the app to test that code, suddenly I am getting an InternalServerError response to start subscription, list subscriptions and stop subscription. The error is returned after a long timeout (in fact I had to increase the default timeout value).
So as of about two hours ago all the APIs are returning InternalServerError after a long timeout. This is happening on the following APIs:
/activity/feed/subscriptions/start
/activity/feed/subscriptions/list
/activity/feed/subscriptions/stop
The body of the response message is empty. So does not include any error info as described in https://msdn.microsoft.com/office-365/office-365-management-activity-api-reference.
Seems crazy this could be a service outage, so I must be missing something really elemental?
Hmmm. With no further changes to the code, now am getting HTTP 200 responses. If that was a service outage, that was a heck of a long outage for 99.9% uptime.

Angular POST gets net::ERR_EMPTY_RESPONSE when server takes 3 mins to finish

Hi i run into this problem, did search online but cannot find exact answer yet.
Basically i'm doing a POST from web client, node.js server will pick it up and starts to execute the command.
If it works, this command (say my_cmd 1234) finishes within 30 seconds, and angular gets the response and updates the status in the webpage.
Now if i pass in an different for this command (my_cmd 2345), it takes 3 minutes to finish, i did run this by hand in the linux console. After 3 minutes it does finish and prints out status message. But Angular POST returns net::ERR_EMPTY_RESPONSE.
So is there a default timeout value i should set ? Thanks !
Ok, actually i changed the timeout value in the server side and it worked.
I followed this.
How to modify the nodejs request default timeout time?

Constant disconnects due to channels going stale for no reason

Ever since the latest release a few days ago, our users are constantly being disconnected due to channel tokens going stale with minutes of being created. Our tokens are set to last for 5 hours, but we're lucky if they last for 5-10 minutes and we cannot even reconnect with a new channel token when the channel closes until the user refreshes.
A Javascript error triggers the beginning of it. It looks like this:
NetworkError: 400 Unknown SID - http://89.talkgadget.google.com/talkgadget/dch/bind?VER=8&clid=C9C2EFC06C7C5163&gsessionid&prop=data&token=AHRlWrrWl611ZMMDw8Apgi5vdYuS9UslofxEiJI47-2n4rkPgmuu1z0AN-UNQcyNEvhck-AYAMSLPru8Aumooz62hYNNbLTbi1a3lTSAzGEyj6TsXZirJYE&RID=rpc&SID=BEBDEFDA92C6A9F7&CI=0&AID=54&TYPE=xmlhttp&zx=gsjg8mb1i987&t=1
Then, in Firefox Firebug, the console gets spammed infinitely with
channel name mismatch; message ignored
Until a refresh occurs.
Our site is a real-time interactive site with chat. Our users are sending us emails upset that they keep getting disconnected. They're leaving the site. This is costing us not only goodwill with our user base, but also money and we are powerless to do anything because the bug is with Google App Engine.
Please fix this or rollback to the previous build immediately until you figure this out. The latest build is broken.
I haven't been able to reproduce this but I'm still looking at it. In the meantime: if you explicitly call socket.close() after receiving the error, can you then create a new Channel object and reconnect? If that doesn't work, you could even try manually removing the element with id "wcs-iframe" itself from the DOM. You should be able to use the original token when doing this instead of fetching a new token.

The sockettimeoutexception is frustrating on Google App engine(JAVA). Workaround needed

I am connecting to a 3rd party server on the following wsdl
http://webservices.ticketvala.com/axis2/services/WSTicketvala?wsdl
I am using JAX-WS to generate client code and call relevent method on 3rd party server. 3rd party server may take time between 15-25 seconds to send response.
It works fine on tomcat.
Now when i deploy this to GAE 1.5.3, often i get ScocketTimeoutException in less than 10 seconds. Sometimes it is succesfull taking even 20 seconds. I want to know why it fails many times. And any workaround to increase this response deadline time / to avoid this ScoketTimeOutException forever.
Similarly,
I have another RESTfull service at http://ticketgoose.com/bookbustickets/TGWSStationNameResponseAction.do?" +
"event=getStationDetails&password=123456&userId=ctshubws
I am connecting it through java.net.URL and many times i get TimeoutException. How can i raise this timeout limit to more than 30 seconds?
Thanks
Deepak
No user-initiated request can take more than 30 seconds to complete in Google App Engine:
http://code.google.com/intl/en/appengine/docs/java/runtime.html#The_Request_Timer
And a HTTP request to a external URL in a user-initiated request can't take more than 10 seconds to complete:
http://code.google.com/intl/en/appengine/docs/java/urlfetch/overview.html#Requests
If you need to do the overall work in more than 30 seconds and can do it in background (not needing to return the response directly via HTTP), use Task Queues. Note that the simplest way to do background work with tasks is to use the DeferredTask. And the best part: HTTP requests to external URLs on tasks can take up to 10 minutes to complete.

How do dynamic backends start in Google App Engine

Can we start a dynamic backend programatically? mean while when a backend is starting how can i handle the request by falling back on the application(i mean app.appspot.com).
When i stop a backend manually in admin console, and send a request to it, its not starting "dynamically"
Dynamic backends come into existence when they receive a request, and
are turned down when idle; they are ideal for work that is
intermittent or driven by user activity.
Resident backends run continuously, allowing you to rely on the state
of their memory over time and perform complex initialization.
http://code.google.com/appengine/docs/python/backends/overview.html
I recently started executing a long running task on a dynamic backend and noticed a dramatic increase in the performance of the frontends. I assume this was because the long running task was competing for resources with normal user requests.
Backends are documented quite thoroughly here. Backends have to be started and stopped with appcfg or the admin console, as documented here. A stopped backend will not handle requests - if you want this, you should probably be using the Task Queue instead.
It appears that a dynamic backend need not be explicitly stopped. The overvicew (http://code.google.com/appengine/docs/python/backends/overview.html) states that the billing for a dynamic backend stops 15 minutes after the last request is processed. So, if your app has a cron job, for example, that requires 5 minutes to complete, and needs to run every hour, then you could configure a backend to do this. The cost you'll incur is 15+5 minutes every hour, or 8 hours for the whole day. I suppose the free quota allows you 9 backend hours. So, this type of scenario would be free for you. The backend will start when you send your first request to it through a queue, and will stop 15 minutes after the last request you send is processed completely.

Resources