1

I have a large file I'm uploading. The entire request can take more than the 30 second limit, so I moved it to a task queue. The problem is that I'm still getting this error, even in a task.
I'm assuming this is because it's a single request to upload a file, and is not immune to the 30-second limit because of this. Is there any way to circumvent this limit, aside from using a 'backend' solution (App engine just added this I think, but it's a pay feature and looks a bit complicated)? I can't split up the file, unfortunately.

EDIT: Sorry for the confusion. By uploading, I mean uploading to a foreign server. The scenario is that I'm pulling data from the data store and uploading it to Google Docs Spreadsheets. The single request to upload it to Google Docs, even though it's in the Task Queue, is exceeding 30 seconds and timing out.

Shaun Budhram
  • 3,690
  • 4
  • 30
  • 41
  • I never had a problem uploading for longer than 30 secs using the Blobstore http://code.google.com/appengine/docs/python/blobstore/ – sje397 Aug 09 '11 at 07:40
  • @Shaun - Are you saying that you moved the file processing to the Task Queue? Or the upload itself (using urlfetch, for example)? If you are using urlfetch you may want to check out the [quotas and limits](http://code.google.com/appengine/docs/python/urlfetch/overview.html#Quotas_and_Limits) that are attached to that. – Kevin P Aug 09 '11 at 17:12
  • You can't "move a file upload to a task" so it's a little confusing what you are asking. Moraes has your answer; use the blobstore. – Chris Farmiloe Aug 09 '11 at 18:36

2 Answers2

3

There are two types of DeadlineExceeded you could be getting - one is due to the request timing out, and the other is due to the URLFetch call timing out. Request deadlines on the task queue are 10 minutes, but the default deadline for a URLFetch call is 5 seconds, so you're almost certainly getting the latter.

You can increase the deadline of your URLFetch call by supplying the timeout parameter. This is limited to 10 seconds in an interactive request, and 10 minutes in a task queue request.

Nick Johnson
  • 100,655
  • 16
  • 128
  • 198
0

Aside the request time limit, there's also a request size limit of 32Mb. If you are you exceeding this, you must use an alternative solution, like Blobstore or external storage.

moraes
  • 13,213
  • 7
  • 45
  • 59