Where are the GAE Backends logs? - google-app-engine

As soon as I figured out how to invoke my app as a Backends app, my log messages stopped appearing.
I found this helpful post which says the Backends logs are kept separately and that I need to switch to Backends view by selecting the named backend from the dropdown at the top of the admin console, but I don't see anything Backends specific in that list to select.
Perhaps this is a clue... when I invoke my app via myapp.appspot.com/dostuff, in the log I see I'm getting the DeadlineExceededError after 60 secs, indicating it's not running as a Backends app. But when I invoke it via mybackend.myapp.appspot.com/dostuff, it continues running as needed, but no log entries!
Seems like I'm missing something. Thanks.

Somehow my app wasn't fully recognized by GAE as a Backend app. And therefore my backend instances weren't available in the drop-list. Seeing that others had similar trouble with a Python 2.7 app (ex.) that had been initially uploaded as a 2.5 app, I created a new app in GAE and uploaded to there and it worked. Sorry I don't have a more definitive answer.
Before all was working well, I also ended up creating an empty /_ah/start handler as suggested by someone in this thread. Also if you're deploying a multi-threaded backend, make sure to check this post out -- there's some important stuff I didn't run across in the docs.

Related

Can I "wake-up" Heroku server on front-end app launch (seperate deploys)?

I'm aware Heroku sleeps apps after 30 mins of inactivity, and that's fine.
I have a React front-end hosted on Vercel, with an ExpressJS back-end hosted on Heroku, and it's very likely that the user won't need to make a MongoDB call (all this server does) within less than the time it takes to "wake up" the server on Heroku. So if when the app loads it were somehow able to "poke" the server to wake it up, most users wouldn't even know it was sleeping in the first place.
Is this possible without making an intentionally redundant CRUD request?
As per the comment from #jonrsharpe under the question, it appears the simplest and easiest way to do this is to just call get('/wakeUp') on the initial page load and let it return a 404. Not pretty but it works.
There's no reason this can't also return something more meaningful, but apparently it doesn't need to.

502 errors for all endpoint requests without changing anything

We just started having lots of 502 errors out of the blue, without deploying anything new. Somehow 99% of all requests to the endpoints don't get through to appengine (as seen in the appengine log). The service status of google app engine and endpoints seems to be green.
We tried deploying a new endpoints api description and a new appengine version using it, also stopping respective versions.
We can also no longer look at the api explorer.
web requests via the gapi js library return "Error 502 (Server Error)!!1" when trying to initialize and load the "_ah/api/static/proxy.html" page
What could be the problem here? Is there a way to "restart" endpoints?
OK, its just magically started working again after around 50min of downtime. I guess it would still be interesting to know if there is anything we could do in cases like this.

can't deploy Google Cloud Endpoints 2.0 on existing service

I have had a Python-based Google App Engine app working great using Cloud Endpoints 1.0 for several years without incident. I have had nothing but trouble migrating to Cloud Endpoints 2.0.
Currently I'm in the following state after already clearing many previous hurdles described in other similar questions:
I have one version of my service called gce1 which uses Endpoints 1.0 and is set as the default service receiving 100% of my traffic. I can point API clients and the APIs Explorer to both gce1-dot-myservice.appspot.com and the default myservice.appspot.com and everything works fine. I can verify in the logs that anything that goes through here is using GCE 1.0.
I have a second version of my service called gce2 which is not receiving any traffic by default, but if I point an API client or the APIs Explorer to gce2-dot-myservice.appspot.com it works just fine, and I can verify in the logs that anything that goes through here is using GCE 2.0.
Great, right? So it would seem that all I need to do is migrate all my traffic to gce2 and I'm done.
But... when I do that everything breaks! The default myservice.appspot.com serves up 405 POST Method Not Allowed responses to my existing clients, and if I look at the APIs Explorer, suddenly it now shows a bunch of obsolete methods that I think are from years ago and are no longer used in my current API. I can't tell where those are coming from (they are nowhere in my code, and haven't been for years), and I can't get the default service to serve the GCE 2.0 API no matter what I do.
The biggest problem is that I have thousands of users in the wild that all point to the default API URL, so it isn't so easy to just have them start pointing to gce2-dot-myservice, and besides, it doesn't make sense that I can't make the new default the new default. I've been working on this migration to GCE 2.0 for months, the deadline for getting off GCE 1.0 is getting closer by the day, and Google Support has not responded since late last year on this topic.
I should also mention I have tried:
Pushing a new service with the GCE2.0 code directly to default
Pushing a new service with no API at all (to maybe clear a cache or something)
Pushing services with all different sorts of version names
None of these have worked, although I haven't done any of them allowing a long delay since I'm working on a live service with real users.
This issue is now resolved, so for most people it should no longer occur. However, in my specific case, I had a legacy API that was getting in the way and had to be deleted, which did require specific attention from a Google engineer.
If you have similar issues, visit issuetracker.google.com/issues/76031966 and comment there.
Thanks to #saiyr for help tracking this down.

GAE not starting

i can;t deploy app to GAE anymore.
App deploy was always stuck with time out.
Some days ago app was working fine. I was able to deploy. I'm sure.
I pickup old version, just to eliminate possibility that something wrong with app
I try to deploy with all reasonable parameters.
I try delete all services (except default which i can't delete, however i uploaded basic one line app)
I already try most of advice which i found on web
I try to disable App engine.. It failed, however after some time i was able to Disable it.
Now i'm not able to enable GAE.. i see folowing error:
ERROR: (gcloud.app.deploy) Unable to deploy to application [**************] with status [USER_DISABLED]: Deploying to stopped apps is not allowed.
Any advice is welcome:
- How to enable GAE
- How to avoid time outs during deploy App to GAE
Thanks a lot
The public issue tracker is a good place to put bugs and/or feature requests. For faster and more urgent issues, contact the Google Cloud Platform support team directly and they will be able to assist you.
Your issue could also simple be a propagation delay, so if in 24/48 hours and you still can't, then it's likely a bug. Furthermore, you can always deploy to another project if it's all the same to you.

Google App Engine devserver redeployment

I have been using GAE and Endpoints for a couple weeks now. I see when I make changes to my code, the devserver will automatically pick up the changes and I am able to sometimes run tests against my updated API in the local API browser. However, I have also noticed some instances where it appears the changes were not picked up automatically and my API browser was hitting old code.
What is the proper process for updating my application to test locally? Do I have to restart my devserver? Do I need to refresh my browser and build new request objects? Can I simply execute a previous request again? (from experience, the last question appears to be no).
Thanks.
While working with the Development Server, I have found that it is best to :
Restart the Server &
Refresh the browser to ensure that any updated services definition is picked up by the API Explorer.

Resources