GAE: Instance shutdown from source code
Actually you can force an instance to shutdown within your code, but it's not pretty.
Just allocate more memory than you instance has, it will be then shutdown for you.
I have used this technique in some python2.5 M/S apps where a DeadlineExceeded during startup could cause problems with incomplete imports.  If the next handled request gave me an ImportError somewhere I knew the instance was toast, so I would redirect the user to the site, and then create a really big string exhausting memory, and then that instance would be shutdown.
You could in theory do something similiar.
In user interface of Google App Engine, in "Instances" I can shutdown selected instances by press button "Shutdown".
Can I do shutdown by program from source code?