Hi! I have been facing this issue permanently since I have my Java app running on App Engine (Standard Edition), that is since 6 years. Users are complaining more and more, so I have to do something about it:
Occasionally, response latency for even the most simple requests to my app climbs up from some 100ms to crazy values like 20s, 30s or even 40s for no apparent reason. I attach a screenshot showing the trace of such a request from today. It was very quiet, so there weren't too many concurrent requests and it's also not a cold start request.
As you can see, there's only a datastore.get and then nothing for a very long time, so it must be a very occupied (shared?) CPU just not being available for my request to be handled. How to deal with such cases?
My approach was to move to App Engine Flexible which was very successful: performance was constantly great, but now I can't use it any more as Google decided to drop the compat runtime making my app incompatible for Flex Env.
Maybe somebody from Google can investigate the issue and point me in the right direction. I don't want to move away from App Engine as I would have to rewrite lots of code depending on GAE SDK APIs. Please help!
Thanks,
Thomas