unrecoverable error

52 views
Skip to first unread message

dimitri pater

unread,
Feb 15, 2006, 4:40:00 PM2/15/06
to cherryp...@googlegroups.com
Hi,
every two or three days my CherryPy powered site (serpia.org) crashes :-( . Please see the traceback below. Does anybody here have a clue why this happens? If you need more info, please tell me. I am also using the recipe here: http://www.cherrypy.org/attachment/wiki/PasswordProtectedPages/check.py on my website.
Thanks you so very much,
Dimitri

Unrecoverable error in the server.

=====First Error=====

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/cherrypy/_cphttptools.py", line 285, in run
    applyFilters('onEndResource')
  File "/usr/lib/python2.3/site-packages/cherrypy/_cphttptools.py", line 641, in applyFilters
    method()
  File "/usr/lib/python2.3/site-packages/cherrypy/lib/filter/sessionfilter.py", line 205, in onEndResource
  File "/usr/lib/python2.3/site-packages/cherrypy/__init__.py", line 70, in __getattr__
    return getattr(childobject, name)
AttributeError: _AttributeDump instance has no attribute '_session'


=====Second Error=====

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/cherrypy/_cphttptools.py", line 428, in handleError
    _cputil.getSpecialAttribute('_cpOnError')()
  File "/usr/lib/python2.3/site-packages/cherrypy/_cputil.py", line 235, in _cpOnError
    cherrypy.HTTPError(500).set_response()
  File "/usr/lib/python2.3/site-packages/cherrypy/_cperror.py", line 188, in set_response
    cherrypy.log(tb)
  File "/usr/lib/python2.3/site-packages/cherrypy/__init__.py", line 125, in log
    logfunc(msg, context, severity)
  File "/usr/lib/python2.3/site-packages/cherrypy/_cputil.py", line 143, in _cpLogMessage
    print s
IOError: [Errno 5] Input/output error

--
----
"All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident."
~Arthur Schopenhauer
----
Please visit dimitri's website: www.serpia.org

Robert Brewer

unread,
Feb 15, 2006, 4:47:32 PM2/15/06
to cherryp...@googlegroups.com
dimitri pater wrote:
> every two or three days my CherryPy powered site
> (serpia.org) crashes :-( . Please see the traceback
> ...

> File "/usr/lib/python2.3/site-packages/cherrypy/_cputil.py",
> line 143, in _cpLogMessage
> print s
> IOError: [Errno 5] Input/output error

I can't address the first error, but the second is probbaly due to you
using a wrapper over your HTTP server that doesn't allow printing to
stdout. You should probably set server.log_to_screen = False (and
server.log_file to some physical file location if you haven't already).


Robert Brewer
System Architect
Amor Ministries
fuma...@amor.org

dimitri pater

unread,
Feb 15, 2006, 4:51:03 PM2/15/06
to cherryp...@googlegroups.com
thanks Robert,
I haven't done that already and I will do so now
Dimitri

Christian Wyglendowski

unread,
Feb 15, 2006, 5:21:32 PM2/15/06
to cherryp...@googlegroups.com
Robert Brewer wrote:
> You should probably set server.log_to_screen = False (and
> server.log_file to some physical file location if you haven't already).

A story:

A couple months ago, I couldn't for the life of me figure out why Google
wasn't indexing my site. I had submitted it to be crawled, emailed
Google to beg for mercy, blah blah blah... Nothing. I was digging
around in my logs one day when I noticed I wasn't really getting any
404s, but a *bunch* of 500s. This struck me as odd. Then I noticed
that even requests for robots.txt were returning a 500! I tried
browsing to robots.txt an got the "Unrecoverable error in the server"
message.

I finally figured out that it was due to running the CP server detached
from a terminal with logToScreen=True. Doh! The Googlebot is now
frequenting my site regularly.

Just-so-you-don't-feel-lonely yr's,

Christian
http://www.dowski.com

dimitri pater

unread,
Feb 15, 2006, 5:41:20 PM2/15/06
to cherryp...@googlegroups.com
Hi Christian,
If I understand you correctly, setting logToScreen=True was the reason that the Googlebot wasn't indexing you site? Googlebot visited my site 454+30 times and MSNbot 935+90 times this month only. But up till now logToScreen was True...
mmhh, maybe someone can shed a light on this,
tanks,
Dimitri
 

A story:

A couple months ago, I couldn't for the life of me figure out why Google
wasn't indexing my site.  I had submitted it to be crawled, emailed
Google to beg for mercy, blah blah blah... Nothing.  I was digging
around in my logs one day when I noticed I wasn't really getting any
404s, but a *bunch* of 500s.  This struck me as odd.  Then I noticed
that even requests for robots.txt were returning a 500!  I tried
browsing to robots.txt an got the "Unrecoverable error in the server"
message.

I finally figured out that it was due to running the CP server detached
from a terminal with logToScreen=True.  Doh!  The Googlebot is now

Christian Wyglendowski

unread,
Feb 15, 2006, 6:31:50 PM2/15/06
to cherryp...@googlegroups.com
dimitri pater wrote:
> Hi Christian,
> If I understand you correctly, setting logToScreen=True was the reason
> that the Googlebot wasn't indexing you site?

Well, having server.logToScreen=True on my server was causing any CP
exception (even NotFound, aka 404) to foul up something internal and
generate the internal server error, thus the 500 HTTP status code.

I usually ssh into my box after starting it up and do a "python
myserver.py &" to get the server running in the background. Then I quit
the ssh session, and the CP server keeps running. I think it loses its
terminal or something like that when I end my ssh session though.

I then have Apache proxy requests for projects.dowski.com to my CP app.

The reason the Googlebot was staying away had to do with it getting a
500 status when trying to read robots.txt. Your setup might be
different enough from mine that you aren't getting exactly the same
behavior as I was.

It just sounded like a similar situation.

Christian
http://www.dowski.com

dimitri pater

unread,
Feb 15, 2006, 6:49:11 PM2/15/06
to cherryp...@googlegroups.com
On 2/16/06, Christian Wyglendowski <chri...@dowski.com> wrote:

I usually ssh into my box after starting it up and do a "python
myserver.py &" to get the server running in the background.  Then I quit
the ssh session, and the CP server keeps running.  I think it loses its
terminal or something like that when I end my ssh session though.

 

It just sounded like a similar situation.

and it *does* sound like a similar situation,
I also ssh to start the server and probably that loses the terminal when exiting the session
thanks,
Dimitri

Jason Earl

unread,
Feb 15, 2006, 9:19:06 PM2/15/06
to cherryp...@googlegroups.com
dimitri pater <dimitr...@gmail.com> writes:

You guys need to take a look at using screen. Not only does screen
provide a terminal to programs, but you can reconnect to them if the
connection gets cut. I generally keep any number of remote terminals
open and then reconnect to them after I have sshed in with a simple
screen -x.

Just a thought.

Jason Earl

Reply all
Reply to author
Forward
0 new messages