V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
crazycookie
V2EX  ›  Google App Engine

urlfetch ApplicationError 问题

  •  
  •   crazycookie · 2011-08-08 10:55:10 +08:00 · 4089 次点击
    这是一个创建于 4875 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 条回复    1970-01-01 08:00:00 +08:00
    ayanamist
        1
    ayanamist  
       2011-08-08 18:17:00 +08:00
    ApplicationError 5的问题一般是达到限制的上限,例如数据库每秒每Root Entity只能写入5次,每秒urlfetch次数不能超过5次。
    这是GAE的硬限制,花钱也解决不了。
    所以我很怀疑GAE真的能支撑一个大型应用网站吗?
    crazycookie
        2
    crazycookie  
    OP
       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
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1245 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:30 · PVG 01:30 · LAX 09:30 · JFK 12:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.