Anyone seen the below error message from PHP7 on Google App Engine standard environment?
Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.
Example log from GCP:
xx.xxx.xxx.xx - - [01/Jul/2019:09:16:11 +0100] "GET /api/courses HTTP/1.1" 500 - - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" "example.com" ms=12009 cpu_ms=3303 cpm_usd=0 loading_request=0 instance=00c61b117c915eddeba77b2a4f20a2ae2b81fc81a941138beb270170b47b91aedffd87f2 app_engine_release=1.9.71 trace_id=1f2cdcf1c2ea56bc5ebf7cf12577b057
I don't see any logs in my PHP application so don't think the issue is there, but I also can't see any details of the error in GCP.
Where do I need to look? Any help appreciated!
Thanks
EDIT
Using gcloud app logs tail reveals the following errors, no idea how to fix these or if they're the cause of the issue!
2019-07-01 19:21:29 default[20190701t094939] nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /tmp/google-config/nginx.conf:3
2019-07-01 19:21:27 default[20190701t094939] [01-Jul-2019 19:21:27] ERROR: unable to read what child say: Bad file descriptor (9)
2019-07-01 19:21:18 default[20190701t094939] [01-Jul-2019 19:21:18] WARNING: [pool app] child 25 exited on signal 7 (SIGBUS) after 0.718745 seconds from start
EDIT 2
I've added caching to a pretty heavy API end point that has stopped these errors from happening, as you can see after I deployed the change on July 1st in the evening. Looking at the 500 logs they seem to correlate with spikes in traffic so if I had to guess maybe the instance was hitting a Memory/CPU limit?!
Related
I have build it from eclipse and ran on development server, it works, when I deploy it on app engine from eclipse, I got this following error, any idea why?
Very first time it went up to oauth2 dance, but it did not succeed, I have fixed redirect-url on api console, then, localhost worked, I did deployed again onto app engine, but it did not work, I got this error:
Error: 500 Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
Error log in App engine console:
2013-06-07 01:59:36.619 /oauth2callback?code={removed now} 500 2416ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
68.5.238.205 - - [07/Jun/2013:01:59:36 -0700] "GET /oauth2callback?code={removed now} HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36" "{my appid }.appspot.com" ms=2416 cpu_ms=1581 cpm_usd=0.000087 app_engine_release=1.8.0 instance=00c61b117c2c977fac245e8480eff747e75eb6
I 2013-06-07 01:59:34.228
com.google.glassware.AuthFilter doFilter: Skipping auth check during auth flow
I 2013-06-07 01:59:34.230
com.google.glassware.AuthServlet doGet: Got a code. Attempting to exchange for access token.
I 2013-06-07 01:59:35.427
com.google.glassware.AuthServlet doGet: Code exchange worked. User 115370471277937689999 logged in.
W 2013-06-07 01:59:36.614
Error for /oauth2callback
java.lang.NoClassDefFoundError: com/google/common/collect/Lists
at com.google.glassware.NewUserBootstrapper.bootstrapNewUser(NewUserBootstrapper.java:54)
at com.google.glassware.AuthServlet.doGet(AuthServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
This looks like a bug in App Engine and the Google OAuth endpoints. It's being tracked in the Glass issue tracker. You can star that issue to receive updates as the investigation proceeds.
In the mean time, check out the .NET and PHP quick starts. They're working great.
Queue seemed to jam up. Very large number of retries of with:
47:32.546 /_ah/mapreduce/controller_callback 200 325ms 0kb AppEngine-Google; (+xxx://code.google.com/appengine)
0.1.0.2 - - [14/May/2013:14:47:32 -0700] "POST /_ah/mapreduce/controller_callback HTTP/1.1" 200 124 "xxx://ah-builtin-python-bundle-dot-ok-alone.appspot.com/_ah/mapreduce/controller_callback" "AppEngine-Google; (+xxx://code.google.com/appengine)" "ah-builtin-python-bundle-dot-ok-alone.appspot.com" ms=326 cpu_ms=0 cpm_usd=0.000014 queue_name=default task_name=appengine-mrcontrol-15811304617282FD9E118-1182 pending_ms=100 app_engine_release=1.8.0 instance=00c61b117ce38007a896105636da1be48f70e6db
'xxx' replaces 'http'
Ran out my data write quota very rapidly though my data writes are actually tiny and few, relatively. What caused this problem? How to fix it?
I am using just the default queue without any modifications.
Any help greatly appreciated!
I just had this same issue. I fixed it by manually deleting the unsuccessful jobs in the default Task Queue on the admin console.
Since 2 days.. when trying to load the home page at http://achhabachhadev.appspot.com/ I am receiving the following error .. need to know If I can do something to fix it.
Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it.
At the logs level all I see is that the request could not be completed in 1 min. Please tell me is there something else which could be the problem. Any help is welcome.. as it was all working till 2 days ago..
The logs are as given below:
53 / 500 62976ms 0kb Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 I 2012-03-15 04:41:49.013 javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext I 2012-03-15 04:42:19.717 javax.servlet.ServletContext log: Initializing Spring FrameworkServlet 'ICCFinal02' W 2012-03-15 04:42:42.245 Error for / com.google.apphosting.runtime.HardDeadlineExceededError: This request (80d56e654b79f25b) started at 2012/03/15 11:41:41.284 UTC and was st W 2012-03-15 04:42:42.245 at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthentic C 2012-03-15 04:42:42.293 Uncaught exception from servlet com.google.apphosting.runtime.HardDeadlineExceededError: This request (80d56e654b79f25b) started at 2012/03/15 11:41:4 I 2012-03-15 04:42:42.315 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 requ W 2012-03-15 04:42:42.315 A problem was encountered with the process that handled this request, causing it to exit.
Did you try re-deploying? I've noticed that every once in a while the appservers get hung up and a redeploy is required to fix it.
I have a project on Google App Engine. It has 2 separate data-stores one which holds articles and the other holds any article which is classified as a crime. (True or False)
But when I try and run my cron to move the crime articles into the "crime" data-store I receive this error:
Has anyone experienced this and how did they over come it!?
0kb AppEngine-Google;
0.1.0.1 - - [22/Apr/2011:09:47:02 -0700] "GET /place HTTP/1.1" 500 138 - "AppEngine-Google;
(+http://code.google.com/appengine)"
"geo-event-maps.appspot.com" ms=1642
cpu_ms=801 api_cpu_ms=404
cpm_usd=0.022761 queue_name=__cron
task_name=740b13ec69de6ac36b81ff431d584a1a loading_request=1
As a result my cron fails.
I just had a similar problem where my cron was crashing due to the fact that it was finding an non-ascii character and not able to process it? Try encode('utf-8'). My cron's work ok without needing the login URL, but it's a good tip for future :-)
Just my 2 cents worth for your question ;-)
It's probably not related to cron. Trying to load your URL directly (http://geo-event-maps.appspot.com/place) returns an HTTP 500 error. As an admin of the app, you should be able to run any cron job without error just by pasting the URL into a browser, so start there.
By the way, make sure to require admin access to any cron URLs. As an unauthorized user I should have received a 401 error, not a 500. Even if you use just one handler, you can do something like this in your app.yaml:
- url: /cron/.*
script: main.py
login: admin
- url: /.*
script: main.py
I am getting the following error in App Engine after I deployed it. Does anybody know the reason? It's causing an error page sometimes. It seems simplejson is the cause...
According to http://code.google.com/status/appengine/ everyting should be working accordingly.
09-20 11:03AM 56.027 / 500 55902ms 240cpu_ms 0kb Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; nl-nl) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5,gzip(gfe)
- - [20/Sep/2010:11:04:51 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; nl-nl) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5,gzip(gfe)" "" ms=55903 cpu_ms=240 api_cpu_ms=0 cpm_usd=0.006723 loading_request=1 pending_ms=1266
E 09-20 11:04AM 51.915
<class 'google.appengine.runtime.DeadlineExceededError'>:
Traceback (most recent call last):
File "/base/data/home/apps//7.344918194765199957/main.py", line 11, in <module>
from logic import home, program, image, searchhandler, twitter, sitemap, feed
File "/base/data/home/apps/7.344918194765199957/logic/home.py", line 14, in <module>
from django.utils import simplejson
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/__init__.py", line 95, in <module>
from django.utils.simplejson.decoder import JSONDecoder
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/decoder.py", line 6, in <module>
from django.utils.simplejson.scanner import Scanner, pattern
File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/scanner.py", line 3, in <module>
"""
I 09-20 11:04AM 51.924
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.
This is the error that the page will show:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
It seems this is not the only error causing the 500 error. Because most of the time this seems to be the cause:
09-20 11:37AM 18.229 /ohohcherso.html 500 11007ms 0cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3,gzip(gfe),gzip(gfe)
94.209.194.233 - sammiestoel [20/Sep/2010:11:37:29 -0700] "GET /ohohcherso.html HTTP/1.1" 500 0 "http://www.tweetstream.nl/index.html" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3,gzip(gfe),gzip(gfe)" "www.tweetstream.nl" ms=11008 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000148
W 09-20 11:37AM 29.237
Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is under unexpectedly high or uneven load. If you see this message frequently, please contact the App Engine team.
Here's your problem:
<class 'google.appengine.runtime.DeadlineExceededError'>
Your page is too slow, it should load within 30 seconds. Otherwise the App Engine will kill it.
http://code.google.com/appengine/docs/python/runtime.html#The_Request_Timer
It seems the real problem was there was a """ in the file as some comments, which created the 500 error. The app is working smooth now. I'm happy I found it at last.
So if you get this error first check if you made comments in a bad way!