V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
moonese

GAE 发邮件总是说超额了

  •  
  •   moonese · Apr 23, 2011 · 6977 views
    This topic created in 5495 days ago, the information mentioned may be changed or developed.
    一个很简单的 cron 任务,一天也才发几封邮件而已,内容也绝对不算大的,就是几个K吧,但是经常说超标了,发送失败。

    看过 app engine 的 Mail quota,应该远远在限额之下的,怎么会老是报错呢?
    http://code.google.com/appengine/docs/quotas.html#Mail

    错误如下:
    500 11473ms 93cpu_ms 1kb AppEngine-Google; (+http://code.google.com/appengine)

    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/mail.py", line 796, in send
    make_sync_call('mail', self._API_CALL, message, response)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 308, in MakeSyncCall
    rpc.CheckSuccess()
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
    raise self.exception
    OverQuotaError: The API call mail.Send() required more quota than is available.
    4 replies    1970-01-01 08:00:00 +08:00
    aveline
        1
    aveline  
       Apr 24, 2011
    注意下Mail免费版貌似每小时只能发送8封
    moonese
        2
    moonese  
    OP
       Apr 25, 2011
    Resource Free Default Quota Daily Limit Maximum Rate
    Recipients Emailed (billable) 2,000 recipients 8 recipients/minute


    上面的链接里有关于免费版的限制的,是每分钟8封邮件。
    findheart
        3
    findheart  
       Apr 26, 2011
    看看log,是不是cron写得有问题。
    moonese
        4
    moonese  
    OP
       Apr 26, 2011
    跟这个相关的log就在上面了,就是给自己用的一个小程序,每天4封邮件的样子,貌似不应该超过限额的。

    2011-04-25 20:00:05.776 /tasks/gethzfc365info 500 4901ms 93cpu_ms 1kb AppEngine-Google; (+http://code.google.com/appengine)

    0.1.0.1 - - [25/Apr/2011:20:00:05 -0700] "GET /tasks/xx HTTP/1.1" 500 1511 - "AppEngine-Google; (+http://code.google.com/appengine)" "xx.appspot.com" ms=4902 cpu_ms=93 api_cpu_ms=0 cpm_usd=0.628574 queue_name=__cron task_name=204d00e0d737a809e892963397484ad7 loading_request=1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3001 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 07:18 · PVG 15:18 · LAX 00:18 · JFK 03:18
    ♥ Do have faith in what you're doing.