SocketServer - Connection Reset By Peer (Randomly)

Graeme Matthew gsmatthew at ozemail.com.au
Thu Jun 12 09:19:57 EDT 2003


Hi all, please, any help would be much appreciated as I am going mad here
:-)

I am using Python's SocketServer.ThreadingTCPServer. It all works fine up to
a point. I have a single script called controller.py that resides in my
scriptalias folder. It's sole purpose  is to simply take a cgi request
convert it to an xml request and send it to the application server. Why ?
well later we might want to open it to other applications, so instead of
writing more code, other applications simply send an xml request directly to
the app server. The app server builds a request object and does some basic
validation then passes the request object to the Dispatcher instance that
will then dispatch it to the appropiate class in the model layer.

I can sometimes submit the webpage (controller.py) 10 times without an
Internal Server Error, and sometimes 3, its random, the http log files says:


File "/www/bi/cgi-bin/controller.py",line 30, in ?
response = sock.recv(1024)
socket.error: (104, 'Connection reset by peer')

Has anyone experienced this strange behaviour ?

Regards


Graeme









More information about the Python-list mailing list