title: Ktor: Can't call App Engine Standard APIs
body: <p>I'm trying to run a simple Ktor server on Google App Engine Standard. If I run <a href="https://github.com/ktorio/ktor-samples/tree/master/deployment/google-appengine-standard" rel="nofollow noreferrer">their sample code on github</a> it works well, but fails as soon as I call any App Engine API with the following message:</p>
  
  <blockquote>
    <p>Can't make API call memcache.Set in a thread that is neither the original request thread nor a thread created by ThreadManager</p>
  </blockquote>
  
  <p>All App Engine APIs trigger similar error messages. Is this related to how Ktor handles requests, and is there a way to make them work?</p>
  
  <p>I think that the <a href="https://github.com/googleapis/google-cloud-java" rel="nofollow noreferrer">Google Cloud java library</a> doesn't have this threading limitation, but unfortunately I can't use it. I need to access the App Engine Memcache service, which is only available through the App Engine APIs.</p>