DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
crazycookie

urlfetch ApplicationError 问题

  •  
  •   crazycookie · Aug 8, 2011 · 4712 views
    This topic created in 5395 days ago, the information mentioned may be changed or developed.
    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支付啊,稳定点,行不?
    2 replies    1970-01-01 08:00:00 +08:00
    ayanamist
        1
    ayanamist  
       Aug 8, 2011
    ApplicationError 5的问题一般是达到限制的上限,例如数据库每秒每Root Entity只能写入5次,每秒urlfetch次数不能超过5次。
    这是GAE的硬限制,花钱也解决不了。
    所以我很怀疑GAE真的能支撑一个大型应用网站吗?
    crazycookie
        2
    crazycookie  
    OP
       Aug 9, 2011
    感谢楼上的热心,问题找到了,不是你说的那样
    是urlfetch gae deadline 默认是5 ,最大是10
    我修改成10 就没问题了
    我全局修改的
    修改方式参见:http://jjinux.blogspot.com/2011/06/python-increasing-timeouts-for-urlfetch.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2973 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 09:32 · PVG 17:32 · LAX 02:32 · JFK 05:32
    ♥ Do have faith in what you're doing.