Hi Marzia, The code is nothing special, it boils down to this:
urlfetch.fetch(amazonurl, payload=jpegfile, urlfetch.PUT, headers=amazonheaders, allow_truncated=false) (I'm using s3fetch() from this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/83bae2a7f93a476b). Changing the timeout makes no difference (tried 50s), the ApplicationError happens in less than 100ms after the fetch() setup. Only setting _API_CALL_DEADLINE to None (no timeout, blocking socket) helps. It really seems that something in urlfetch_stub/httplib does not like non-blocking operations. Maybe it is only on MacOS or python2.5 (Python 2.5.2 (r252:60911, Jul 22 2008, 00:43:13) [GCC 4.0.1 (Apple Inc. build 5478)] on darwin). I don't have access to another machine/os at the moment. This same code on appspot.com works fine. Regards, Gijsbert On Nov 21, 7:07 pm, Marzia Niccolai <[EMAIL PROTECTED]> wrote: > Hi, > > Would it be possible for you to provide the code you are using that fails > with this error? Does increasing the time out allow the request to go > through? > > -Marzia > > On Fri, Nov 21, 2008 at 1:13 PM, Gijsbert <[EMAIL PROTECTED]>wrote: > > > > > Hi, > > > Since upgrading to 1.1.6 I get ApplicationError: 2 (35, 'Resource > > temporarily unavailable') on doing urlfetch operations with 'larger' > > payloads (in my case a PUT to Amazon S3) on my dev server. Larger is > > 68KB in this case, so not really large and should be able to be > > delivered within the 5 seconds deadline. > > The (35, 'Resource...') seems to be unix error (EAGAIN or > > EWOULDBLOCK). I have not dug very deep, but I would hazard a guess > > that this might be caused with the urlfetch call deadline simulation, > > with the following code: > > > urlfetch_stub.py:199: socket.setdefaulttimeout(_API_CALL_DEADLINE) > > > When I comment out this line the urlfetch() completes without errors > > in about 1.5 seconds. > > > Seems some piece of code is not happy with non-blocking sockets > > (although I don't quite see where, the stub uses HTTPConnection, which > > uses socket.sendall(), which should work with non-blocking sockets). > > > This is on MacOSX Intel 10.5.5. > > > Cheers, > > Gijsbert > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
