Hey Ben, If you've only observed the issue on methods with an auth filter, and the gap in time is always before any other line than the authfilter, it's quite likely this is the cause, but here are some other things to check:
You could check the "ms" vs "cpu_ms" times in the log listing for that request, or even check if there's a "pending_ms" field. This could also indicate what's going on. If "ms" is significantly higher than "cpu_ms", it means you're spending time waiting on remote calls. If "pending_ms" is high, this means the request spent time waiting in a pending queue to find an instance able to handle it (this would require a change to scaling settings to improve, allowing more idle instances to be ready). So, after checking on that, it might come back to the fact that the auth filter is taking a while. The nature of the auth filter would be quite important to diagnosing that any further. I hope this is helpful so far, let me know your findings! Cheers, Nick Cloud Platform Community Support On Wednesday, August 17, 2016 at 5:19:17 AM UTC-4, Ben Rometsch wrote: > > We are running a Java Cloud Endpoints API on Flexible VMs. Most of the > endpoints complete in a timely manner, but from time to time we see things > like the attached in the trace: > > > <https://lh3.googleusercontent.com/-EVHbof4Fxos/V7QqlP--HaI/AAAAAAAAnTU/Hyh1F07ym6sM9KpvAuGxysgKp-xNze9lwCLcB/s1600/screenshot_201608171471424924.png> > > > Does anyone know why/what the platform is doing in the first 1000ms? We > have an AuthFilter that runs to check users are authenticated, but normally > this runs quickly at the start of the request. We have some API urls that > dont go through Cloud Endpoints and they don't exhibit this issue, so are > suspicious that its the cloud endpoints but we are not sure? > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/4d7da0fc-84ca-4d71-9ae9-e02878090ac8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
