Local development with Google App Engine go111 using dev_appserver is slow

87 Views Asked by At

I am locally running a GAE go111 program using dev_appserver.py on a reasonably fast Windows10 desktop. I have to use dev_appserver as I'm running in classic compatibility mode by calling

appengine.Main()

I have an end point that I install using

http.HandleFunc("/TC/", handleTestConnection)

This endpoint has no code in it

func handleTestConnection(w http.ResponseWriter, r *http.Request) {
}

Each time I try to access this endpoint using...

http://127.0.0.1:8080/TC/

...it takes ~2 seconds to respond. This happens on all endpoints regardless of warmup or complexity. This is not a first run problem, it will happen each time I call the endpoint.

The logs from dev_appserver are as follows...

DEBUG    2021-09-24 19:14:10,460 module.py:1499] Dispatching request to <Instance 9cca95d2ec7bedafddd44639c7e2cd139bfc: 0/8, total: 1> after 0.0000s pending
DEBUG    2021-09-24 19:14:12,490 <string>:134] API server executing remote_api_pb.Request: 
service_name: "logservice"
method: "Flush"
request: "\n\000"
request_id: "uumGeJVDum"
DEBUG    2021-09-24 19:14:12,492 <string>:194] API server responding with remote_api_pb.Response:
DEBUG    2021-09-24 19:14:12,492 <string>:493] Handled logservice.Flush in 0.0020
DEBUG    2021-09-24 19:14:12,493 instance.py:410] Request handled by <Instance 9cca95d2ec7bedafddd44639c7e2cd139bfc: 1/8, total: 2> in 2.0320s
INFO     2021-09-24 19:14:12,493 module.py:883] default: "GET /TC/ HTTP/1.1" 200 -
INFO     2021-09-24 19:14:12,516 module.py:883] default: "GET /favicon.ico HTTP/1.1" 200 1150

Everything works correctly and fast once deployed to a Google app engine server, it's just local development that is slow.

I have tried numerous options of dev_appserver including...

--logs_path
--dev_appserver_log_level
--log_level
--threadsafe_override
--max_module_instances
--datastore_consistency_policy
--enable_host_checking

I have tried running natively using

go run .

But as this is in classic compatibility mode this does not work.

I have tried turning off virus checkers / firewalls. Other browsers. Using localhost. Other ports. 3 completely different desktops. Using host=0.0.0.0 then my local ip. All result in the same delay.

Has anyone hit and solved this problem?

0

There are 0 best solutions below