urlfetch ApplicationError 问题

2011-08-08 10:55:10 +08:00
 crazycookie
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 1122, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/base/python_runtime/python_dist/lib/python2.5/urllib2.py", line 1087, in do_open
r = h.getresponse()
File "/base/python_runtime/python_dist/lib/python2.5/httplib.py", line 197, in getresponse
self._allow_truncated, self._follow_redirects)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 260, in fetch
return rpc.get_result()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 364, in _get_fetch_result
raise DeadlineExceededError(str(err))
DeadlineExceededError: ApplicationError: 5


gae的各种悲剧,各种超时,蛋疼的蛋蛋都有裂纹了。
请问有什么好的解决方法么?
支付啊,paypal支付啊,稳定点,行不?
4099 次点击
所在节点    Google App Engine
2 条回复
ayanamist
2011-08-08 18:17:00 +08:00
ApplicationError 5的问题一般是达到限制的上限,例如数据库每秒每Root Entity只能写入5次,每秒urlfetch次数不能超过5次。
这是GAE的硬限制,花钱也解决不了。
所以我很怀疑GAE真的能支撑一个大型应用网站吗?
crazycookie
2011-08-09 14:00:00 +08:00
感谢楼上的热心,问题找到了,不是你说的那样
是urlfetch gae deadline 默认是5 ,最大是10
我修改成10 就没问题了
我全局修改的
修改方式参见:http://jjinux.blogspot.com/2011/06/python-increasing-timeouts-for-urlfetch.html

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/16604

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX