Supervisord + Tornado Debug Output

174 views
Skip to first unread message

Dav-id

unread,
May 28, 2010, 9:49:36 AM5/28/10
to Tornado Web Server
Hi everyone,

I have a problem that I am struggling to trace down which I believe to
be configuration related with Supervisor.

My tornado app runs fine apart from one particular part of it which
checks for the presence of a cookie and if none then it will add a
record to a DB which contains information about the client - IP
Address which I get the geographic details for (from a file cached
locally on the disk) and UserAgent which I parse out into OS, Browser
etc.

This is not an issue with cookies though as I have authentication
which sets a cookie correctly.

The actual error I am getting is 500: Internal Server Error.

However I cant figure out how to view the debug log from Tornado…

My /etcsupervisord.conf file:

——

[unix_http_server]
file=/tmp/supervisord.sock

[supervisord]
logfile=/var/log/supervisord/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/var/run/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200
childlogdir=/var/log/supervisord/

[rpcinterface:supervisor]
supervisor.rpcinterface_factory =
supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock

[program:tornado-8000]
command=/var/www/vhosts/tornado/app.py -port=8000


——

Any help is appreciated.

Thanks
David

Douglas Stanley

unread,
May 28, 2010, 10:38:30 AM5/28/10
to python-...@googlegroups.com
There's a supervisord config flag to make stderr redirect to stdout.
I had to turn that on in order to see anything that was getting sent
to stderr. That might be your problem. Look at the sample config
generated by echo_supervisord_conf or whatever the command is
(I forget off the top of my head).

Hope that helps.

Doug

--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Ben Darnell

unread,
May 28, 2010, 10:51:25 AM5/28/10
to python-...@googlegroups.com
Try "supervisorctl tail tornado-8000 stderr". Or pass the
command-line flag --log_file_prefix=/tmp/tornado.log so the logs go
somewhere easier to find.

-Ben

David Tait

unread,
May 28, 2010, 10:56:39 AM5/28/10
to python-...@googlegroups.com
Thanks Doug, Ben.

This has helped me greatly as I can now see I have some permission issues which are easily fixed now I have identified them.

All the best
David

Reply all
Reply to author
Forward
0 new messages