trouble keeping site up

View: New views
7 Messages — Rating Filter:   Alert me  

trouble keeping site up

by Jan Limpens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can start my site easily, but already the second request sends it to an unusuable state (wehre it welcomes my site's users with a healthy:
Traceback (most recent call last):
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 1174, in communicate
req.respond()
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 544, in respond
self._respond()
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 556, in _respond
response = self.wsgi_app(self.environ, self.start_response)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 239, in __call__
return app(environ, start_response)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 130, in __call__
return self.wsgiapp(environ, start_response)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 313, in __call__
return head(environ, start_response)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 301, in tail
return self.response_class(environ, start_response, self.cpapp)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 74, in __init__
self.setapp()
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 96, in setapp
_cherrypy.log(tb, severity=40)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/__init__.py", line 385, in __call__
return log.error(*args, **kwargs)
File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cplogging.py", line 55, in error
self.error_log.log(severity, ' '.join((self.time(), context, msg)))
File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
apply(self._log, (level, msg, args), kwargs)
File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
self.handle(record)
File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
self.callHandlers(record)
File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
self.emit(record)
File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
self.handleError(record)
File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
file.write(str+terminator)
IOError: [Errno 32] Broken pipe
Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.

I am not a very experienced python or cherrypy developer, so I probably do not provide all necessary infos here. Yust drop me a line and I could provide anything needed...

Any ideas?

--
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by Gloria W :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


How did you start the process? Did you happen to (1) start it in a
terminal, not redirecting stdout and stderr, then (2) close the
terminal? This is what it looks like, from a curosry glance.
Gloria

> I can start my site easily, but already the second request sends it to
> an unusuable state (wehre it welcomes my site's users with a healthy:
> Traceback (most recent call last):
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 1174, in communicate
>
>      req.respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 544, in respond
>      self._respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 556, in _respond
>
>      response = self.wsgi_app(self.environ, self.start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 239, in __call__
>      return app(environ, start_response)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 130, in __call__
>      return self.wsgiapp(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 313, in __call__
>
>      return head(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 301, in tail
>      return self.response_class(environ, start_response, self.cpapp)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 74, in __init__
>      self.setapp()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 96, in setapp
>
>      _cherrypy.log(tb, severity=40)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/__init__.py", line 385, in __call__
>      return log.error(*args, **kwargs)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cplogging.py", line 55, in error
>      self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>      apply(self._log, (level, msg, args), kwargs)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>
>      self.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>      self.callHandlers(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
>
>      hdlr.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>      self.emit(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>
>      self.handleError(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>      traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>    File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>
>      _print(file, 'Traceback (most recent call last):')
>    File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>      file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>    
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I
> probably do not provide all necessary infos here. Yust drop me a line
> and I could provide anything needed...
>
> Any ideas?
>
> --
> Jan
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by Jan Limpens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

no it is started via a autostart.cgi that looks like this:

#!/bin/env python2.4
import os

# Test if the process is already running
running = False
try:
    # Try to read pid file
    pid = open('/home/jan/webapps/www_limpens_com/pid').read()
    # Check if this process is up
    lines = os.popen('ps -p %s' % pid).readlines()
    if len(lines) > 1:
        running = True
    else:
        # Delete pid file
        os.remove('/home/jan/webapps/www_limpens_com/pid')
except IOError:
    pass

print "Content-type: text/html\r\n"
if running:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Site is starting ...<a href=".">click here<a></body></html>"""
else:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Restarting site ...<a href=".">click here<a></body></html>"""
    os.setpgid(os.getpid(), 0)

    pid = os.fork()
    if pid == 0:
        os.execl('/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/site.py')
    else:
        open('/home/jan/webapps/www_limpens_com/pid', 'w').write(str(pid))
       

2009/9/9 Gloria W <strangest@...>

How did you start the process? Did you happen to (1) start it in a
terminal, not redirecting stdout and stderr, then (2) close the
terminal? This is what it looks like, from a curosry glance.
Gloria
> I can start my site easily, but already the second request sends it to
> an unusuable state (wehre it welcomes my site's users with a healthy:
> Traceback (most recent call last):
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 1174, in communicate
>
>      req.respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 544, in respond
>      self._respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 556, in _respond
>
>      response = self.wsgi_app(self.environ, self.start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 239, in __call__
>      return app(environ, start_response)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 130, in __call__
>      return self.wsgiapp(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 313, in __call__
>
>      return head(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 301, in tail
>      return self.response_class(environ, start_response, self.cpapp)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 74, in __init__
>      self.setapp()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 96, in setapp
>
>      _cherrypy.log(tb, severity=40)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/__init__.py", line 385, in __call__
>      return log.error(*args, **kwargs)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cplogging.py", line 55, in error
>      self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>      apply(self._log, (level, msg, args), kwargs)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>
>      self.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>      self.callHandlers(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
>
>      hdlr.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>      self.emit(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>
>      self.handleError(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>      traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>    File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>
>      _print(file, 'Traceback (most recent call last):')
>    File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>      file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I
> probably do not provide all necessary infos here. Yust drop me a line
> and I could provide anything needed...
>
> Any ideas?
>
> --
> Jan
>
> >






--
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by Jan Limpens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

By the way, I also tried
http://groups.google.com/group/cherrypy-users/browse_thread/thread/581138d6de84502d?pli=1

but no effect here...

2009/9/9 Jan Limpens <jan.limpens@...>
no it is started via a autostart.cgi that looks like this:

#!/bin/env python2.4
import os

# Test if the process is already running
running = False
try:
    # Try to read pid file
    pid = open('/home/jan/webapps/www_limpens_com/pid').read()
    # Check if this process is up
    lines = os.popen('ps -p %s' % pid).readlines()
    if len(lines) > 1:
        running = True
    else:
        # Delete pid file
        os.remove('/home/jan/webapps/www_limpens_com/pid')
except IOError:
    pass

print "Content-type: text/html\r\n"
if running:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Site is starting ...<a href=".">click here<a></body></html>"""
else:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Restarting site ...<a href=".">click here<a></body></html>"""
    os.setpgid(os.getpid(), 0)

    pid = os.fork()
    if pid == 0:
        os.execl('/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/site.py')
    else:
        open('/home/jan/webapps/www_limpens_com/pid', 'w').write(str(pid))
       

2009/9/9 Gloria W <strangest@...>


How did you start the process? Did you happen to (1) start it in a
terminal, not redirecting stdout and stderr, then (2) close the
terminal? This is what it looks like, from a curosry glance.
Gloria
> I can start my site easily, but already the second request sends it to
> an unusuable state (wehre it welcomes my site's users with a healthy:
> Traceback (most recent call last):
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 1174, in communicate
>
>      req.respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 544, in respond
>      self._respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 556, in _respond
>
>      response = self.wsgi_app(self.environ, self.start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 239, in __call__
>      return app(environ, start_response)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 130, in __call__
>      return self.wsgiapp(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 313, in __call__
>
>      return head(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 301, in tail
>      return self.response_class(environ, start_response, self.cpapp)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 74, in __init__
>      self.setapp()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 96, in setapp
>
>      _cherrypy.log(tb, severity=40)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/__init__.py", line 385, in __call__
>      return log.error(*args, **kwargs)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cplogging.py", line 55, in error
>      self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>      apply(self._log, (level, msg, args), kwargs)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>
>      self.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>      self.callHandlers(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
>
>      hdlr.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>      self.emit(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>
>      self.handleError(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>      traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>    File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>
>      _print(file, 'Traceback (most recent call last):')
>    File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>      file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I
> probably do not provide all necessary infos here. Yust drop me a line
> and I could provide anything needed...
>
> Any ideas?
>
> --
> Jan
>
> >






--
Jan



--
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by Gloria W :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some error is throwing the exception, but it then fails when trying to write that exception to stderr. This is because of the fork(), and the child process trying to reference a file descriptor to which it no longer has access.

It looks like you're not controlling stdin, stdout, and stderr for the child process. Take a look at this recipe:

http://code.activestate.com/recipes/66012/

and this will give you some ideas re: good practices for daemonizing your processes.

To find out what the _real_ error was, try running this on the command line:
/home/jan/webapps/www_limpens_com/bin/python2.5 /home/jan/webapps/www_limpens_com/site.py

It may be easier to debug this way, and daemonize when it's running well. All errors will appear in your terminal window in this case.

Gloria

By the way, I also tried
http://groups.google.com/group/cherrypy-users/browse_thread/thread/581138d6de84502d?pli=1

but no effect here...

2009/9/9 Jan Limpens <jan.limpens@...>
no it is started via a autostart.cgi that looks like this:

#!/bin/env python2.4
import os

# Test if the process is already running
running = False
try:
    # Try to read pid file
    pid = open('/home/jan/webapps/www_limpens_com/pid').read()
    # Check if this process is up
    lines = os.popen('ps -p %s' % pid).readlines()
    if len(lines) > 1:
        running = True
    else:
        # Delete pid file
        os.remove('/home/jan/webapps/www_limpens_com/pid')
except IOError:
    pass

print "Content-type: text/html\r\n"
if running:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Site is starting ...<a href=".">click here<a></body></html>"""
else:
    print """<html><head><META HTTP-EQUIV="Refresh" CONTENT="2; URL=."></head><body>
    Restarting site ...<a href=".">click here<a></body></html>"""
    os.setpgid(os.getpid(), 0)

    pid = os.fork()
    if pid == 0:
        os.execl('/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/bin/python2.5', '/home/jan/webapps/www_limpens_com/site.py')
    else:
        open('/home/jan/webapps/www_limpens_com/pid', 'w').write(str(pid))
       

2009/9/9 Gloria W <strangest@...>


How did you start the process? Did you happen to (1) start it in a
terminal, not redirecting stdout and stderr, then (2) close the
terminal? This is what it looks like, from a curosry glance.
Gloria
> I can start my site easily, but already the second request sends it to
> an unusuable state (wehre it welcomes my site's users with a healthy:
> Traceback (most recent call last):
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 1174, in communicate
>
>      req.respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 544, in respond
>      self._respond()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/wsgiserver/__init__.py", line 556, in _respond
>
>      response = self.wsgi_app(self.environ, self.start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 239, in __call__
>      return app(environ, start_response)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cptree.py", line 130, in __call__
>      return self.wsgiapp(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 313, in __call__
>
>      return head(environ, start_response)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 301, in tail
>      return self.response_class(environ, start_response, self.cpapp)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 74, in __init__
>      self.setapp()
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cpwsgi.py", line 96, in setapp
>
>      _cherrypy.log(tb, severity=40)
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/__init__.py", line 385, in __call__
>      return log.error(*args, **kwargs)
>
>    File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1.2-py2.5.egg/cherrypy/_cplogging.py", line 55, in error
>      self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>      apply(self._log, (level, msg, args), kwargs)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>
>      self.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>      self.callHandlers(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
>
>      hdlr.handle(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>      self.emit(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>
>      self.handleError(record)
>    File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>      traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>    File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>
>      _print(file, 'Traceback (most recent call last):')
>    File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>      file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I
> probably do not provide all necessary infos here. Yust drop me a line
> and I could provide anything needed...
>
> Any ideas?
>
> --
> Jan
>
> >






--
Jan



--
Jan




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by morecowbell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


looks like you're running on webfaction and if recall correctly, the
default setup is mod_py. you app looks like it's using wsgi. did you
install wsgi 2.5 as a separate application? you got make sure you have
your app server.socket.port pointing to the port of the wsgi app

On Sep 9, 10:46 am, Jan Limpens <jan.limp...@...> wrote:

> I can start my site easily, but already the second request sends it to an
> unusuable state (wehre it welcomes my site's users with a healthy:
>
> Traceback (most recent call last):
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 1174, in communicate
>     req.respond()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 544, in respond
>     self._respond()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 556, in _respond
>     response = self.wsgi_app(self.environ, self.start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cptree.py",
> line 239, in __call__
>     return app(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cptree.py",
> line 130, in __call__
>     return self.wsgiapp(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 313, in __call__
>     return head(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 301, in tail
>     return self.response_class(environ, start_response, self.cpapp)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 74, in __init__
>     self.setapp()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 96, in setapp
>     _cherrypy.log(tb, severity=40)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/__init__.py",
> line 385, in __call__
>     return log.error(*args, **kwargs)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cplogging.py",
> line 55, in error
>     self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>     apply(self._log, (level, msg, args), kwargs)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>     self.handle(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>     self.callHandlers(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in
> callHandlers
>     hdlr.handle(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>     self.emit(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>     self.handleError(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>     traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>   File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>     _print(file, 'Traceback (most recent call last):')
>   File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>     file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I probably do
> not provide all necessary infos here. Yust drop me a line and I could
> provide anything needed...
>
> Any ideas?
>
> --
> Jan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: trouble keeping site up

by Jan Limpens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you are right, this is webfaction.
i did not install wsgi separately, but I setup the app as an "application listining to a port",
installed virtualenv ans setuptools, and in the env cherrypy, genshi and another lib. in the cherrypy config dict I pointet the app port to the port I was assigned and use 127.0.0.1 as host...

       'log.screen': False,
        'log.error_file': 'site.log',
        'server.socket_host': '127.0.0.1',
        'server.socket_port': 47405,
 
something I could do?

2009/9/10 morecowbell <hoteljorba@...>

looks like you're running on webfaction and if recall correctly, the
default setup is mod_py. you app looks like it's using wsgi. did you
install wsgi 2.5 as a separate application? you got make sure you have
your app server.socket.port pointing to the port of the wsgi app

On Sep 9, 10:46 am, Jan Limpens <jan.limp...@...> wrote:
> I can start my site easily, but already the second request sends it to an
> unusuable state (wehre it welcomes my site's users with a healthy:
>
> Traceback (most recent call last):
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 1174, in communicate
>     req.respond()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 544, in respond
>     self._respond()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/wsgiserver/__init__.py",
> line 556, in _respond
>     response = self.wsgi_app(self.environ, self.start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cptree.py",
> line 239, in __call__
>     return app(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cptree.py",
> line 130, in __call__
>     return self.wsgiapp(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 313, in __call__
>     return head(environ, start_response)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 301, in tail
>     return self.response_class(environ, start_response, self.cpapp)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 74, in __init__
>     self.setapp()
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cpwsgi.py",
> line 96, in setapp
>     _cherrypy.log(tb, severity=40)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/__init__.py",
> line 385, in __call__
>     return log.error(*args, **kwargs)
>   File "/home/jan/webapps/www_limpens_com/lib/python2.5/site-packages/CherryPy-3.1 .2-py2.5.egg/cherrypy/_cplogging.py",
> line 55, in error
>     self.error_log.log(severity, ' '.join((self.time(), context, msg)))
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1056, in log
>     apply(self._log, (level, msg, args), kwargs)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1101, in _log
>     self.handle(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1111, in handle
>     self.callHandlers(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 1148, in
> callHandlers
>     hdlr.handle(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 655, in handle
>     self.emit(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 757, in emit
>     self.handleError(record)
>   File "/usr/local/lib/python2.5/logging/__init__.py", line 706, in handleError
>     traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
>   File "/usr/local/lib/python2.5/traceback.py", line 124, in print_exception
>     _print(file, 'Traceback (most recent call last):')
>   File "/usr/local/lib/python2.5/traceback.py", line 13, in _print
>     file.write(str+terminator)
> IOError: [Errno 32] Broken pipe
>
> Latest cherrypy from easy_install, virtualenv, and python 2.5.4 on redhat.
>
> I am not a very experienced python or cherrypy developer, so I probably do
> not provide all necessary infos here. Yust drop me a line and I could
> provide anything needed...
>
> Any ideas?
>
> --
> Jan




--
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---