I am attempting to port a Python app from App Engine Standard Environment to App Engine Flexible environment. Following the directions in the App Engine documentation, I've changed my app.yaml file to use "python-compat" mode, as shown:
service: default
runtime: python-compat
api_version: 1
vm: true
threadsafe: true
instance_class: F2
inbound_services:
- warmup
builtins:
- remote_api: on
env_variables:
GCLOUD_PROJECT: the-name-of-my-project
When deployed, any attempts to call into the datastore from the application (using the NDB api) results in the following trackback (truncated):
File "/env/local/lib/python2.7/site-packages/google/appengine/datastore/datastore_rpc.py" in check_rpc_success
1371. rpc.check_success()
File "/env/local/lib/python2.7/site-packages/google/appengine/api/apiproxy_stub_map.py" in check_success
579. self.__rpc.CheckSuccess()
File "/env/local/lib/python2.7/site-packages/google/appengine/ext/vmruntime/vmstub.py" in _WaitImpl
312. raise self._ErrorException(*_DEFAULT_EXCEPTION)
Exception Type: RPCFailedError at /volume-list/
Exception Value: The remote RPC to the application server failed for call datastore_v3.RunQuery().
Any idea what the problem is? So far as I can tell, the App Engine documentation gives no special instruction for setting up NDB with the python-compat run-time.