urlfetch ApplicationError 问题 - V2EX
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 4507 次点击
    这是一个创建于 5248 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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     Solana     2581 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 388ms UTC 12:29 PVG 20:29 LAX 04:29 JFK 07:29
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86