web services - Python Bottle framework becoming non-responsive -


i having problem using python's bottle framework(http://bottlepy.org/docs/dev/index.html) host webpage. seems work fine period of time , following error , fails show webpage. script doesn't crash webpage becomes non responsive.

any suggestions?

 traceback (most recent call last):   file "/usr/lib/python2.7/socketserver.py", line 295, in _handle_request_noblock     self.process_request(request, client_address)   file "/usr/lib/python2.7/socketserver.py", line 321, in process_request     self.finish_request(request, client_address)   file "/usr/lib/python2.7/socketserver.py", line 334, in finish_request     self.requesthandlerclass(request, client_address, self)   file "/usr/lib/python2.7/socketserver.py", line 651, in __init__     self.finish()   file "/usr/lib/python2.7/socketserver.py", line 710, in finish     self.wfile.close()   file "/usr/lib/python2.7/socket.py", line 279, in close     self.flush()   file "/usr/lib/python2.7/socket.py", line 303, in flush     self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [errno 32] broken pipe 

i see following error. i'm guessing these occur if request non-existent webpage/object requested-

traceback (most recent call last):   file "/usr/lib/python2.7/socketserver.py", line 295, in _handle_request_noblock     self.process_request(request, client_address)   file "/usr/lib/python2.7/socketserver.py", line 321, in process_request     self.finish_request(request, client_address)   file "/usr/lib/python2.7/socketserver.py", line 334, in finish_request     self.requesthandlerclass(request, client_address, self)   file "/usr/lib/python2.7/socketserver.py", line 649, in __init__     self.handle()   file "/usr/lib/python2.7/wsgiref/simple_server.py", line 116, in handle     self.raw_requestline = self.rfile.readline()   file "/usr/lib/python2.7/socket.py", line 447, in readline     data = self._sock.recv(self._rbufsize) error: [errno 104] connection reset peer 

this question seems similar how prevent errno 32 broken pipe?

you received sigpipe , due attempting write closed socket. try handle exception that:

    except socket.error, e:         if isinstance(e.args, tuple):             print "errno: %d" % e[0]             if e[0] == errno.epipe:                # caught peer disconnection                print "remote host disconnected" 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -