Reputation: 832
I'm currently running a (free) Google App Engine instance which I need to restart manually. However, in the 'instances' tab in my project it just gives me the options to 'view logs' or 'shutdown'.
Shutting down the instance is not an option because I do not want to manually re-deploy the application to google appspot. This is not an option because I need to do this from multiple locations (even on the road), and my project is located on a single desktop computer.
The reason I want to be able to restart the instance is because of the caching within my Java application. I cache certain users and data so that I only rarely have to call the datastore.
However, when I want to delete certain records from the datastore they still exist in the cache of my application. This means that the users can access data which was already deleted by hand.
I know it's possible to write a single-use admin application just to clear the cache, but that's not the way I wish to solve this problem. It should be easier than that.
Is there any way to restart a running instance, effectively rebooting my Java application, without re-deploying the entire application to google appspot?
Upvotes: 14
Views: 16830
Reputation: 2488
The "Flush memcache" approach didn't work for me. I couldn't find where to shutdown a service either.
Instead, I found a way to delete the instance being served then hit the application's url. App engine would automatically create a new instance, which essentially would be a restart.
To delete an instance, do this:
From App engine dashboard, click "Instances" on the side menu. On the Instances page—below the graph—you would see a list of active instances, delete them, then hit your app's url.
Upvotes: 7
Reputation: 41089
Go to the Datastore viewer tab in your App Engine console. Click on "Flush memcache" button. Or, go to the Memcache viewer tab and click on "Flush cache" button.
If you want to restart your instance manually - shut it down. Then hit your website, and a new instance will be created automatically. There is no need to redeploy your app again.
Upvotes: 11