How to debug redirect

5 views
Skip to first unread message

Anthony Kong

unread,
Jun 23, 2009, 2:33:23 AM6/23/09
to cherrypy-users
Hi, all,

I have written a simple app which has some pages that redirects from
time to time.

In some situation the redirect takes forever and nothing special is
logged the error log.

If I killed the server and restarted it again, I may encountered
message about LOCK file. Removing them make the web application accept
connections again.

I wonder if there is anything I can do to capture more debug messages
from the server?


Cheers, Anthony



Tim Golden

unread,
Jun 23, 2009, 3:36:45 AM6/23/09
to cherryp...@googlegroups.com
Anthony Kong wrote:
> I have written a simple app which has some pages that redirects from
> time to time.
>
> In some situation the redirect takes forever and nothing special is
> logged the error log.


Apart from anything else, have you used something like
LiveHeaders on firefox to watch the to-and-fro of
headers? ie do you know at which stage in the GET-30x-GET
dance it's failing? That will help you narrow things down.

You can use cherrypy.log ("blah") to log messages out to
a log file. But if you want to know what's going on inside
the cherrypy lib code, I've always just poked log / print
statements inside there to track what's going on.

As a (slightly radical) alternative, you could you the
trace or the profile modules to spot what's happening
where. But I'd keep that as a later resort.

TJG

Lakin Wecker

unread,
Jun 23, 2009, 9:08:17 AM6/23/09
to cherryp...@googlegroups.com
pyconquer - http://www.aminus.net/wiki/PyConquer will give you
detailed messages about what's going on inside the server.

Lakin
Reply all
Reply to author
Forward
0 new messages