Anyone know why sometimes the Google Sheets API takes a long time to respond? So long that it sometimes times out in my database (Greater than 80seconds).
https://docs.google.com/spreadsheets/export?id=[SHEET-ID]&exportFormat=csv
It just says "Waiting for docs.google.com..." and it can vary from a very quick wait to a very long wait.
My file is very small.
Related
Currently I have a Next application with SSR using getInitialProps that takes too long to deliver the HTML based on the complexity of the app (I'm getting high Waiting for Server to respond times in Chrome in the network tab).
I'd want to figure out what is adding so much time (sometimes I get seconds), so I'm trying to:F
Find out how much time does it take for the server from the time it receives the GET request for the page to the time it sends the HTML
Have a clear picture of what's happening and how much time does it take during the SSR. Because at the moment is a black box for me.
I tried suggested improvements: code splitting, lazy loading components, code improvements, etc.
I tried using Server Timing API to measure the requests performed in getInitialProps, to narrow down a part of the process. But it doens't help with the rendering process and other Next processes that might add to the response time.
I tried using the Node.js profiler for Chrome using NODE_OPTIONS='--inspect' next dev. This is the closest I got to what I wanted, but I can't tell where does the server respond back, and what do each Activity corresponds to. Some documentation could be helpful.
I tried middleware. Not sure if I got something wrong, but I can't measure the time from start to finish.
Some observations were that other more simple pages, have faster response times, but regardless the time it takes is extremely longer (1 - 2 orders of magnitude)
I am working on a application that uses the Spotify Web API to build and maintain playlists for the user based on a given recipe (just a JSON that represents a logic-scheme basically). Currently the application is in development mode. I use delays between each API call I make, currently about 400ms. And I also had delays of 7.5s when I got the occasional 429 error (too many requests).
Anyway, I recently made it so that all of the playlist recipes get rebuilt in an infinite loop. So the process is just always running and making API calls about every 100ms, in order to keep all of the playlists up-to-date based on the recipes. However after letting this loop run for about 10 minutes, I started persistently getting 429s even after retrying after 7.5s and longer.
Apparently the 429 responses contain a header called 'retry-after' which is how long Spotify suggests waiting before making another call (as I said, before I was just using a fixed 7.5s delay on 429s). I am seeing that the value I am receiving for 'retry-after' is on the order of about 76,000s (21 hours).
But I thought that the rate limits are enforced over a 30s window...
(see https://developer.spotify.com/documentation/web-api/guides/rate-limits/) So why is my 'retry-after' header so high?
This is mostly a design philosophy question so the code itself I think is mostly irrelevant but if you'd like to take a look it's available here: https://github.com/jakefoglia/Smart-Playlist-Manager
site/SPM-core/maintainer.js : contains the 'infinite loop'
site/SPM-core/spotify_api_hook.js : contains most of the API calls
The 30s window is presented in the documentation only as an example, not as an actual way in which the API works. As you correctly say, Retry-After header (value is seconds) is all the information you need to decide how long to wait before doing the next call.
Each time your app "violates" the rate limit by making an early request, it gets "punished" by an increased delay period, — and since the app apparently never even consulted the header, and repeatedly violated the limit, the delay got this high. This however did not result in shutdown, or blocking, or rejection, or something similar, because the header only suggests the duration of a delay, rather than enforcing it.
It takes about 20-25 seconds for navigator.credentials.get to come back. Is there to make this faster?
For every 1000 messages 1 message is running for 20 minutes and more than that where other messages are completing in less than 1 sec. What could be the reason and I don't know whether it is going to be complete.
Some messages are going to "Never Finished" state other than Success and Failure. What could be the reason and I think my function has no issues if so we are logging it.
If the message processing is taking a long time periodically (or not finishing at all), it must be that every now and then the operations in your job function take a long time or fail. All depends on what your job is actually doing internally. If it is going async in places, the SDK will continue to wait for it to return. We did add a new feature very recently TimeoutAttribute (see release notes: http://github.com/Azure/azure-webjobs-sdk/wiki/Release-Notes). The Dashboard should show any function errors.
If you suspect that your job may be hanging/failing at certain places, you might try verifying locally that this is handled correctly by your logging etc. You could add Task.Delays or errors at various spots and verify that it's logged/handled correctly.
How long does it usually take between calling sp_session_logout and the callback logged_out gets called? From my experience, sometimes it's fast, but sometimes it takes few seconds. For example, sometimes search takes longer, browse is ok.
Thanks.
From my experience, sometimes it's fast, but sometimes it takes few seconds.
That's your answer. It takes "some time". Logging out does a bunch of stuff like flushing disk caches and so on as well as disconnecting the user from the service.