internal.flushLog: Flush RPC: service bridge HTTP failed ... i/o timeout -> app engine standard environment, go runtime 112 & 113 issue

373 views
Skip to first unread message

Gökhan Akca

unread,
May 24, 2020, 2:11:14 PM5/24/20
to Google App Engine

When I deploy my go application in GAE standard enviroment using runtime: go112 or go113 loading an html page of my very simple application in my browser takes 10 seconds.
However, configuring the runtime to go111 in app.yaml leads to immediate page load without any lag or timeout log.

The log contains this entry

{
  "textPayload": "2020/05/23 20:34:43 internal.flushLog: Flush RPC: service bridge HTTP failed: Post http://appengine.googleapis.internal:10001/rpc_http: dial tcp 169.254.169.253:10001: i/o timeout",
  "insertId": "5ec988e3000d98cc6b5b9b5e",
  "resource": {
    "type": "gae_app",
    "labels": {
      "zone": "europe-west6-3",
      "version_id": "20200523t223037",
      "module_id": "default",
      "project_id": "xxx"
    }
  },
  "timestamp": "2020-05-23T20:34:43.891084Z",
  "labels": {
    "clone_id": "XXXXXX117c75b94ee99fb3c024c136a5fce28d7c2a813754222997c13b09XXXXXX"
  },
  "logName": "projects/xxx/logs/stderr",
  "receiveTimestamp": "2020-05-23T20:34:43.893803794Z"
}


Since I am learning go, my code is extremely simple:

func main() {
    http.HandleFunc("/home", homepageHandler)
    appengine.Main()
}

func homepageHandler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(w, "home")
}

Even opening the root URL leading to HTTP 404 takes 10 seconds.
Hence, my code seems to be irrelevant.


Is there a breaking change using go 1.12+ in GAE standard environment?

Sticking to go version 1.11 is a workaround for now, but I am worried that once it becomes deprecated, I won't be able to run my application in GAE without the timeouts when upgrading the go version.

Jason Collins

unread,
May 24, 2020, 4:03:23 PM5/24/20
to Google App Engine
The appengine package no longer functions in Go 1.12 and newer. Likely that package is attempting to make some sort of connection and blocking until timeout. Remove the "appengine.Main()" line.

Gökhan Akca

unread,
May 30, 2020, 6:09:20 PM5/30/20
to Google App Engine
Thanks a lot.
That worked out.
Reply all
Reply to author
Forward
0 new messages