dev_appserver.py slow instance start

60 views
Skip to first unread message

Zdenko Hrcek

unread,
Oct 18, 2019, 12:26:41 PM10/18/19
to Google App Engine
Greetings,

just wondering if somebody had the same problem as me and was able to solve it. Question posted on Stackoverflow https://stackoverflow.com/questions/58447137/dev-appserver-py-slow-start

After some time I needed to do changes on GAE Python (2.7) First Generation app, but when I develop and run locally, it's basically nonusable due to a very slow start. These are printed logs:

INFO     2019-10-18 07:56:35,533 devappserver2.py:278] Skipping SDK update check.
INFO     2019-10-18 07:56:35,595 api_server.py:275] Starting API server at: http://localhost:36159
INFO     2019-10-18 07:56:35,599 dispatcher.py:270] Starting module "default" running at: http://127.0.0.1:8080
INFO     2019-10-18 07:56:35,600 admin_server.py:152] Starting admin server at: http://localhost:8000
INFO     2019-10-18 08:01:01,644 instance.py:294] Instance PID: 28496

What I notice that the last line (instance.py) is printed after ~5 minutes and only after that app responds to requests, not before. Interesting that the admin server (localhost:8000) is available right away. Of course, when I do some code change it automatically reloads and it repeats again.


Things I tried/found out:

  • it behaves like that on my all GAE projects Python First Gen.
  • tried to create a bare minimal version (webapp2 with one URL), clean virtualenv, still the same behavior
  • tried to reinstall Google Cloud SDK. delete the whole google-cloud-sdk folder and install again, no changes
  • tried to install an older version of Cloud SDK
  • used clean VM and it works ok!!!, so it looks like there could be something wrong with my system (outside of SDK), but I'm not sure what.

It's interesting that the pause between the last two log lines is always about 5 minutes, not sure why exactly that time.

I'm running out of ideas so any advice would be appreciated.

George (Cloud Platform Support)

unread,
Oct 21, 2019, 9:35:56 AM10/21/19
to Google App Engine
Hello Zdenko, 

You are right: if you don't notice any delays when using a clean VM, it seems likely that your local setup is at fault. 

All this is above the scope of this discussion group, in fact off-topic. You should post such questions to StackOverflow, or other similar forums. This forum is meant for general discussion on the platform and its services. By contrast, in StackOverflow, you get in contact with experienced programmers, who are happy to help. 
Reply all
Reply to author
Forward
0 new messages