Could someone explain the 10 minute timeout on creating a file upload url?

149 views
Skip to first unread message

Edward Hartwell Goose

unread,
Jan 3, 2012, 5:43:38 AM1/3/12
to google-a...@googlegroups.com
Hi,

I've been playing around with the Blobstore and noticed that (for me at least) it seems impossible to upload a blob more than 10 minutes after the createUploadUrl has been called.

In the Python version of the Docs (http://code.google.com/appengine/docs/python/blobstore/functions.html) this appears to be expected behaviour, and the two issues 3668* and 3475** seem to corroborate this fact. I've raised a 3rd issue (6660***) for the issue to be mentioned in the Java docs.

However, it would be good to know the reasoning and understanding behind this 10 minute limit? We currently have a blob upload form at the bottom of a rather long and complicated form and it seems some of our users take longer than 10 minutes to fill it out. This then leads to the upload failing and a grumpy user who doesn't understand what's got wrong. It took us a while to figure this out as well, as there is no error logged anywhere other than the http://temporary-blobstore-error.appspot.com message that the user gets.

Is there a reason it's only 10 minutes between uploads? Is it possible to raise this? (I can raise an issue for it).

Furthermore, is there a reason why there is no logging related to the issue?

Thanks,
Ed


Edward Hartwell Goose

unread,
Jan 3, 2012, 5:53:32 AM1/3/12
to google-a...@googlegroups.com
P.s. As a workaround I assume the following would work:

On page load, initiate a JS timeout that will fire in 9 minutes time.
The timeout will initiate an ajax request to a custom servlet that will generate a new blobstore upload url.
The JS will then swap out the old blobstore url with the new one.

If anyone know this will/won't work, that'd be useful! 

Tom Willis

unread,
Jan 3, 2012, 7:00:21 AM1/3/12
to google-a...@googlegroups.com
Yes, in a sense, from the client , request the url to post to when the client actually has a file to upload. This is how I implemented it for the application my day job is currently working on. It works as advertised.

Stuart Langley

unread,
Jan 3, 2012, 7:11:39 AM1/3/12
to google-a...@googlegroups.com
The 10 minute limit is in part a measure to prevent against DOS attacks to the upload url that is generated.

The scenario you have described is usually handled by using some javascript to create the upload URL on demand when the user is ready to submit the form.

Work is being undertaken to provide a more descriptive error rather than just redirecting to the temporary blobstore error URL.

You could probably star http://code.google.com/p/googleappengine/issues/detail?id=6313 if being able to redirect to a specific URL on upload failures as well.

jon

unread,
Jan 8, 2012, 3:27:09 AM1/8/12
to Google App Engine
You can get rid of upload URL altogether by writing a little bit of
custom code on your server. Java guide:
http://code.google.com/appengine/docs/java/blobstore/overview.html#Writing_Files_to_the_Blobstore

I urge you to use this solution, it involves with much fewer moving
parts. Cleaner and easier to maintain.
Reply all
Reply to author
Forward
0 new messages