ConditionRacer
ConditionRacer

Reputation: 4498

Google App Engine not updating deployed files

I'm getting some strange issues with google app engine serving old versions of files. I have included some logging in one of my servlets and deployed to google app engine several times over the last 24 hours. However, instead of seeing the logging i added, I'm seeing logs from a previous version of the file every time the servlet runs.

I've tried changing versions and redeploying but this doesnt seem to fix the problem.

I'm using Eclipse Juno with the app engine plugin if that makes a difference.

Any ideas what I can try or what I might be doing wrong?

Upvotes: 10

Views: 14169

Answers (8)

Ashok Bugude
Ashok Bugude

Reputation: 91

  1. It could be due to caching issue. Try reloading the website by adding a query parameter . Eg <website-url>?q=1 and see if changes are reflected

  2. Open the url -> latest-version-number-dot-website-url . Latest version number can be obtained by clicking on version menu item on the side bar as seen below

Latest version number

  1. If you have app.yaml file in your source code. Try removing headers related to caching and deploy and check to confirm its a caching issue. Caching headers could be of below form Cache-Control: public, max-age=604800, immutable

Upvotes: 1

Ergin
Ergin

Reputation: 9356


December 2020 Answer


Not sure if this is an account or billing specific setting, but I found that App Engine started not updating to my latest app deploy once I reached 50 Versions in my App Engine list.

After deleting a bunch of old versions (taking down to 30) on next deploy it picked up my latest changes immediately.

Upvotes: 1

Israel
Israel

Reputation: 1454

The gcloud (at list in python) has problem with line 'skip_files' in app.yaml, So you can try the old method of deploying app with app engine, use appcfg.py instead of gcloud. see how in https://cloud.google.com/appengine/docs/standard/python/tools/uploadinganapp

Upvotes: 0

I tried all the suggestions on SO, but ultimately, I found the best fix.

Because I transferred domain names and web hosting, I neglected to change my Domain's Resource Records. After making sure my code worked properly with the application (appname.appspot.com), I created a Custom Domain found in Console menu > App Engine > Settings > Custom domains

custom domains

After you add the custom domain, make sure you change your Domain setting's CNAME www alias to the prescribed value (for me it was ghs.googlehosted.com).

Since changing that CNAME value, all of my subsequent deploys updated immediately. Hope this works for you and all others. Happy coding!

Upvotes: 0

enkash
enkash

Reputation: 151

I had a similar problem recently, and that I fixed by logging into appengine.google.com>MyAppIdentifier>(Main)>Versions and selecting the current version as the default.

This should not only serve your latest version, but also use the latest version for log viewing and other administrative tasks.

Upvotes: 8

Johnny Z
Johnny Z

Reputation: 15439

Also make sure your project compiles correctly and doesn't contain any errors. I had this problem basically because I was deploying old compiled code, while it gave me an error "you have errors in your project, are you sure you want to deploy?"

Upvotes: 0

Eudy Sekgota
Eudy Sekgota

Reputation: 31

Make sure that before redeploying your APP after making changes you Remove Launch and Remove All Terminated launches by pressing the double cross buttons next to the "clear console" buttons on the console window in Eclipse...I hope this solve your problem.

Upvotes: 1

Lipis
Lipis

Reputation: 21835

In the logs, make sure that you're checking the correct version:

version in the logs of app engine console

Otherwise redeploy to a brand new version and check that version explicitly directly from the version url that can be found under the Versions section.

Upvotes: 6

Related Questions