V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
kenneth
V2EX  ›  Tornado

为什么我的tornado程序点两下总是出现500错误?

  •  
  •   kenneth · 2012-11-12 23:44:47 +08:00 · 4599 次点击
    这是一个创建于 4175 天前的主题,其中的信息可能已经有所发展或是发生改变。
    @livid
    程序地址: http://diary.188qd.com
    用的tornado的博客,但是点几下总是500,不知道为什么?
    如何调试这个错误?
    看日志也没啥有用信息。
    请高手指点。
    6 条回复    1970-01-01 08:00:00 +08:00
    cabbala
        1
    cabbala  
       2012-11-12 23:51:12 +08:00
    Tornado有打log啊,你应该贴log上来
    kenneth
        2
    kenneth  
    OP
       2012-11-13 00:10:53 +08:00
    @cabbala是指nginx的error.log还是tornado自己的日志?我在nginx日志中看不到有关的错误信息,只是网站点击总出现个500错误。
    cabbala
        3
    cabbala  
       2012-11-13 00:12:17 +08:00
    @kenneth tornado自己的日志啊,有loglevel可调的。

    话说你debug的时候没必要加一层nginx吧。。直接 python xxx.py就好了
    Livid
        4
    Livid  
    MOD
       2012-11-13 01:17:37 +08:00
    具体的 exception 细节可以挂一个 Sentry 看:

    https://www.getsentry.com/
    fanzeyi
        5
    fanzeyi  
       2012-11-13 03:11:08 +08:00
    from tornado.options import define

    define("debug", default = True)
    kenneth
        6
    kenneth  
    OP
       2012-11-28 23:58:07 +08:00
    总结一下,tornado屏蔽了错误,都显示500。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5242 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:42 · PVG 16:42 · LAX 01:42 · JFK 04:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.