Reputation: 9400
This thread seems dead, too: http://groups.google.com/group/google-appengine-java/browse_thread/thread/80d014fd5abd526f
Here's what happens:
Exception Stack Trace is:
Uncaught exception from servlet
javax.servlet.UnavailableException: com.google.apphosting.api.DeadlineExceededException: This request (fc36c7e0f23da9e6) started at 2012/03/06 21:26:41.562 UTC and was still executing at 2012/03/06 21:27:42.117 UTC.
at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:458)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:422)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)
Doesn't GAE java team solved this bug yet?
What can I do? I'd like to avoid setting a cron job for polling my url every 5 minutes :-(
Upvotes: 1
Views: 1166
Reputation: 560
let get something clear, warmup requests does not solve the DeadlineExceededException error.
The DeadlineExceededException you are seeing is due to startup taking longer than 60s.
warmup requests will NOT make the startup any quicker.
paid instances will NOT make the startup any quicker.
The startup cost is due mainly to classloading and resource loading on the classpath. Anything that scans the classpath for classes/resources are slow to load.
to reduce the scan time depends on what frameworks your app is loading on startup. The usual suspects are Spring and JSF.
-lp
Upvotes: 3
Reputation: 80340
You can use warmup requests to bring your instance up to speed before a first user request is sent to it.
Note: this does not affect the delay time of first request when you have no instances running, it only helps when new instances (beyond existing ones) are spun up. However, it should help with the 500 error on the first request.
Upvotes: 2
Reputation: 26574
I believe the simple answer is to pay for the service and create a resident instance, then you won't be subject to the spin-up/tear-down which can be especially expensive with spring.
Another option is to trim your app so it doesn't take so long to start.
Upvotes: 3