A huge "inexplicable" latency almost always requires heating, absorbing resources. Check your application logs to see how many api_ms and cpu_ms are used to warm up.
You can avoid warming up by increasing the maximum expected delay in the appengine control panel. Enabling a higher delay means that requests will wait longer than starting a new instance. This can make each request a little slower, but you will avoid loading requests in heavy weight.
To help with warm-up requests, make sure your appengine-web.xml has:
<warmup-requests-enabled>true</warmup-requests-enabled>
This will cause the application manager to proactively start new instances when the current ones are overloaded (that is, it starts loading before the request moves to a new instance}.
then in the affected slow servlets, make sure you upload the download to your web.xml:
<servlet> <servlet-name>my-servlet</servlet-name> <servlet-class>com.company.MyServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet>
load-on-startup simply ensures that your high-priority servlets are always ready to go as soon as the warm-up request finishes.
source share