Datastore on flex nodejs appengine stopped working - bad gateway 502 - google-app-engine

After making some updates to an app I'm working on, I pushed the app up via gcloud app deploy --version dev and everything seemed to push just fine, but upon further inspection, any of my calls (get or post) that use the #google-cloud/datastore package fail with Bad Gateway 502 - nginx error.
I've put in console.logs everywhere and they never get past the line before any datastore.whatever() calls. tested with .save, .runQuery, and .update.
Weirder still, i can access the datastore just fine via my console, and my localhost still works 100% as expected, pulling the data from my cloud datastore.
I even tried to narrow it down via manual_scaling update i found here but that didn't seem to do anything
thoughts?

Related

App server stopped responding 10054 (Google Cloud)

I have deployed an app on gcloud and used to work regularly, then suddenly when I send request to it I receive this error:
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
It happened before and then I created another Project and deployed the app and it worked, Now, when I do this, it is not working.
I also tried to disable the app and then enable it, but no use,
I tried to make manual or basic scaling, but no use.
I read that I may wait and run the app later as it is a problem of the cloud server. I ran the app later and it worked. Now it is not working again. What should I do to solve the issue?

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.

Application doesn't reflect updated contents once deployed locally through App Engine Standard

I have just started working on App Engine and during my first sample run only I faced this issue. I deployed the sample 'Hello App Engine' servlet code locally through Eclipse IDE. After hitting the localhost URL I was able to see the expected message 'Hello App Engine' as well.
Later I changed the message body to be displayed (Hi App Engine) and again deployed the code. Now, when I hit the localhost URL I don't see the updated message body. Instead it shows me the old message (Hello App Engine) only.
I tried refreshing my browser and manually setting the 'Run configuration' but nothing worked. Does anybody have any leads what could be the possible reason? Thanks.
Have you verified you are executing the redeployment correctly?.
To make sure you are not failing in this step you should delete the application completely and redeploy it again

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.

Where are the GAE Backends logs?

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.

Resources