Error: Server Error 500 Server Error

225 views
Skip to first unread message

Roger

unread,
Oct 17, 2016, 4:00:27 PM10/17/16
to Google App Engine

After uploading an app that was working before, this error results:

Error: Server Error

The server encountered an error and could not complete your request.

Please try again in 30 seconds.


To trace it down, I removed almost all code, and still get the error.


In the console, it says:  

This app has no instances deployed.


Anyone can help?

Adam (Cloud Platform Support)

unread,
Oct 17, 2016, 6:17:20 PM10/17/16
to Google App Engine
Before doing any kind of changes to code, you'd want to check your logs first, which will often give a helpful stack trace to show where the error originated. On a standard runtime instance you can view the request logs, and on a flexible instance you can also view other logs like stderr, crash.log, and vm.syslog which can help troubleshoot deployment errors.

Roger

unread,
Oct 17, 2016, 7:22:20 PM10/17/16
to Google App Engine
Thank you for replying.
I checked the logs, earlier and could not find the reason; gets Error Code 204.
Here is the latest log entry.



19:15:44.624GET5000 B182 msChrome 53/
2604:2000:410f:1800:74da:b01f:2a14:8d3f - - [17/Oct/2016:19:15:44 -0400] "GET / HTTP/1.1" 500 - - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36" "1.go-model.appspot.com" ms=182 cpu_ms=0 cpm_usd=0 loading_request=1 instance=00c61b117cd33cfbc5aca504be8b752ccc0db6da178f3ade65a0cd5aab05 app_engine_release=1.9.46 trace_id=-
{
metadata: {
severity: "ERROR" 
projectId: "go-model" 
serviceName: "appengine.googleapis.com" 
zone: "us9" 
labels: {
appengine.googleapis.com/request_id"58055ba000ff0988d68fd5abdc0001737e676f2d6d6f64656c000131000100" 
appengine.googleapis.com/clone_id"00c61b117cd33cfbc5aca504be8b752ccc0db6da178f3ade65a0cd5aab05" 
}
timestamp: "2016-10-17T23:15:44.624854Z" 
}
protoPayload: {
appId: "s~go-model" 
versionId: "1" 
requestId: "58055ba000ff0988d68fd5abdc0001737e676f2d6d6f64656c000131000100" 
ip: "2604:2000:410f:1800:74da:b01f:2a14:8d3f" 
startTime: "2016-10-17T23:15:44.624854Z" 
endTime: "2016-10-17T23:15:44.807514Z" 
latency: "0.182660s" 
method: "GET" 
resource: "/" 
httpVersion: "HTTP/1.1" 
status: 500 
userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36" 
urlMapEntry: "_go_app" 
wasLoadingRequest: true 
instanceIndex: -1 
instanceId: "00c61b117cd33cfbc5aca504be8b752ccc0db6da178f3ade65a0cd5aab05" 
line: [
0: {
time: "2016-10-17T23:15:44.807389Z" 
severity: "INFO" 
logMessage: "This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application." 
}
1: {
time: "2016-10-17T23:15:44.807396Z" 
severity: "ERROR" 
logMessage: "A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. (Error code 204)" 
}
]
appEngineRelease: "1.9.46" 
}
insertId: "2016-10-17|16:15:49.808763-07|10.106.211.193|1276045338" 
httpRequest: {
status: 500 
}
operation: {
id: "58055ba000ff0988d68fd5abdc0001737e676f2d6d6f64656c000131000100" 
}
}
19:15:44.807This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
19:15:44.807A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. (Error code 204)

Steven Lu

unread,
Oct 17, 2016, 10:50:25 PM10/17/16
to Google App Engine
Adam,

I'm also experiencing this issue with redeployment of the same code to Google App Engine.


On Monday, October 17, 2016 at 6:17:20 PM UTC-4, Adam (Cloud Platform Support) wrote:

Roger

unread,
Oct 20, 2016, 8:42:00 AM10/20/16
to Google App Engine
I checked out a previous git commit, uploaded to app engine, and there was no problem; it responded without error to requests.
Thanks,
Roger

Roger

unread,
Oct 20, 2016, 5:31:04 PM10/20/16
to Google App Engine
I found the error, it was my fault.
I tracked it down with the help of the documentation:

Note: When writing a stand-alone Go program we would place this code in package main. The Go App Engine Runtime provides a special main package, so you should put HTTP handler code in a package of your choice (in this case, hello).

I mistakenly used package main, instead of using another package name. The error only manifests in gae, not the dev_server.

Thanks

Adam (Cloud Platform Support)

unread,
Oct 21, 2016, 4:02:22 PM10/21/16
to Google App Engine
Glad to hear you were able to resolve it. Error 204 is basically an unspecified internal error, but at least the cause of it was discovered in this case.
Reply all
Reply to author
Forward
0 new messages