Erel Segal-Halevi
Erel Segal-Halevi

Reputation: 36745

Lengthy initialization of AppEngine servlet

In my AppEngine application, the servlet takes a long time to initialize. This is not a big problem with a usual Tomcat deployment, as the initialization happens only once. However, in AppEngine, I noticed that many service requests cause AppEngine to launch a new process and do the initialization, and thus, these sevrice requests take a long time.

Is it possible to disconnect the initialization from the service request? Somehow tell AppEngine to do the initialization in the background, so that when a user asks for a page, he won't have to wait so long?

Upvotes: 0

Views: 317

Answers (1)

Sebastian Oliva
Sebastian Oliva

Reputation: 71

You can setup Idle instances or Warmup Requests a the Application Settings at the Applications Settings section of the App Engine console of your app. That should avoid getting those slow initialization times, as your app would be preloaded and ready to go.

Upvotes: 2

Related Questions