Google App Engine - stack trace information

I'm trying to better understand how the Google Cloud Console Stackdriver Trace shows call details and debugs some performance issues for my application. Most requests work very much with memcache set / get settings, and I have some problems here, but I don't understand why there is a long time between calls. I uploaded 2 screenshots.

call @ 1025ms call @ 5235ms

So, as you can see, the @ 1025ms call took 2 ms, but there was more than 4 seconds between it and the urlfetch @ 5235ms call.

Firstly, my code is not intense at this point (and full requests show about 9000 ms of unreliable time), and secondly, most of these requests that run the same code do not have these spaces (i.e. repetition the request does not have the same behavior). But I also see this problem on other requests, and I can not reproduce them.

Please advise!

EDIT:

I downloaded another screenshot from appstats. This is a “normal” request, which usually takes several hundred ms to start (max. 1 second), as well as in localhost (development). I can not find anything to debug further. I feel that I am missing something simple, something at a basic level, in relation to DO and DO NOT ACCEPT with the application engine.

appstats

+4
2

, ( ) , , - App Engine. , . , App Engine AppStats (. SO).

App Engine - , - , .

+1

( " " ):

  • .

    , HTTP-. , . cpu_ms,

    CPU, . , , , 1,2 Intel x86. , [..]. (doc).

    protoPayload.megaCycles.

    :

    2001:... - - [02/Mar/2017:19:20:22 +0100] "GET / HTTP/1.1" 200 660 - "Mozilla/5.0 ..." "example.com" ms=4966 **cpu_ms=11927** cpm_usd=7.376e-8 loading_request=1 instance=... app_engine_release=1.9.48 trace_id=...
    

    cpu_ms (11927) , ( ).

    ? , , , , , . :

    • App Engine. JVM JIT- - , (, , ). load_request = 1 , , - . Warmup .

      , , :

      protoPayload.megaCycles > 10000 and protoPayload.wasLoadingRequest=false
      
    • . App Engine, . , . , App Engine , , , , .

      dev appserver, (, , jstack), . , , .., .

  • , Stackdriver Trace App Engine. , , Cloud SQL. Google Cloud Trace JDBC, SQL-.

  • (!) . , :

    • , , ( App Engine). , ...
    • . ( App Engine), , . .
+1

Source: https://habr.com/ru/post/1652233/


All Articles