Google App Engine and the 30 second timeout

Jun 24, 2010   #google  #java 

Google App Engine is a Java (and Python) hosting service. You are provided with a servlet container to host your web application and several other features.

You can execute scheduled jobs by invoking an URL of your web application periodically via cron jobs.

However, there is a 30 second hard timeout for every request the container serves. Any request that takes more than 30 seconds to serve will experience a com.google.apphosting.api.DeadlineExceededException. This limitation applies to cron started requests as well.

So if you thought about doing long running batch jobs by invoking a private URL of your web application via cron you will fail. Even worse, Google App Engine does not allow you to spawn a new thread in your Java application. So there is basically no option for doing long running batch operations.