Custom Runtime taking long time to respond

54 views
Skip to first unread message

Prateek Malhotra

unread,
Apr 23, 2018, 6:10:04 PM4/23/18
to google-appengine-go
I have a custom runtime for app engine flexible using Go (one of my dependencies has a gccgo requirement). Building and running the docker image locally it runs fine, I have it communicating with Datastore and logging/tracing without much issue. However, when I deploy this, the responses seem to hang. Logs show the request was processed quickly (sub 300ms), but the request itself takes 1+ seconds to complete!

Here is an example where the response is a simple 302 redirect, not a whole lot of data to download there:

From my browser:



And the associated log entry:
httpRequest: {
  latency
:  "0.126517789s"  
  remoteIp
:  "173.70.21.194"  
  requestMethod
:  "GET"  
  requestSize
:  "956"  
  requestUrl
:  "<REMOVED>"  
  responseSize
:  "106"  
  status
:  302  
  userAgent
:  "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"  
 
}



What could be causing it to behave like this? Is it because I'm using a custom runtime? Here is my Dockerfile for reference:


FROM golang:stretch as build


COPY
. /go/src/app

WORKDIR
/go/src/app


RUN go
get -d -v ./...



RUN go build
-o app .


FROM gcr
.io/distroless/base:latest
COPY
--from=build /go/src/app/app /
CMD
["/app"]


EXPOSE
8080/tcp

And my app.yaml:

runtime: custom
env
: flex
service
: auth


manual_scaling
:
  instances
: 1
resources
:
  cpu
: 1
  memory_gb
: 0.5
  disk_size_gb
: 10

Any help/guidance would be much appreciated, thanks in advanced!
Reply all
Reply to author
Forward
0 new messages