Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use Google App Engine's (Java) Task Queues to Persist a lot of data / rows in one Entity
    primarykey
    data
    text
    <p>I'm trying to persist roughly 28,000 "rows" in a single entity e.g. EMPLOYEE</p> <p>Basically, my goal is to avoid being terminated / timing out by using PUTs that exceed 30 seconds - which is what might happen if I just do 28,000 PUTs by invoking a doPost() request sent to a servlet. </p> <p>So I'm thinking of using tasks described in the Google App Engine documentation.</p> <p>Essentially, I would like to upload a csv file in the war directory with 28,000 "employees". Then create a task that will async PUT these 28,000 employee rows to the EMPLOYEE entity.</p> <ul> <li><p>Q1: Is this a viable solution or is there a better way? Again, the goal is to performthe PUTs to avoid being terminated due to the 30 second limit.</p></li> <li><p>Q2: Also what queue.xml configurations should I use to ensure I can perform these PUTs as fast as possible?</p></li> <li><p>Q3: Now, I've tried it, similar to blog entry: <a href="http://gaejexperiments.wordpress.com/2009/11/24/episode-10-using-the-task-queue-service/" rel="nofollow">http://gaejexperiments.wordpress.com/2009/11/24/episode-10-using-the-task-queue-service/</a> but I'm getting the following error after 23 or so seconds:</p> <pre><code>SEVERE: Job default.task1 threw an unhandled Exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8888/dotaskservlet timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch(LocalURLFetchService.java:236) at com.google.appengine.api.taskqueue.dev.LocalTaskQueue$UrlFetchServiceLocalTaskQueueCallback.execute(LocalTaskQueue.java:471) at com.google.appengine.api.taskqueue.dev.UrlFetchJob.execute(UrlFetchJob.java:77) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 16/02/2011 12:12:55 PM org.quartz.core.ErrorLogger schedulerError SEVERE: Job (default.task1 threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8888/dotaskservlet timed out.] at org.quartz.core.JobRunShell.run(JobRunShell.java:214) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --------------- com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8888/dotaskservlet timed out. at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch(LocalURLFetchService.java:236) at com.google.appengine.api.taskqueue.dev.LocalTaskQueue$UrlFetchServiceLocalTaskQueueCallback.execute(LocalTaskQueue.java:471) at com.google.appengine.api.taskqueue.dev.UrlFetchJob.execute(UrlFetchJob.java:77) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) </code></pre></li> <li><p>Q4: I've also checked the Datastore Viewer at <a href="http://localhost:8888/_ah/admin" rel="nofollow">http://localhost:8888/_ah/admin</a> and it seems to have only created 1000 results in that entity. Is 1000 the limit?</p></li> <li><p>Q5: How do I get rid of that above error?</p></li> <li><p>Q6: Can any confirm that the maximum allowed time is 10minutes for a task? or is it still 30seconds? I did come accross this: <a href="http://code.google.com/appengine/docs/java/taskqueue/overview.html#Task_Execution" rel="nofollow">http://code.google.com/appengine/docs/java/taskqueue/overview.html#Task_Execution</a></p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload