Hi,
When the RPC server is down or busy, the program will exit with such error:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/share/videocache/videocache.py", line 792, in run
squid_part()
File "/usr/share/videocache/videocache.py", line 534, in squid_part
video_id_pool.add(video_id)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/httplib.py", line 636, in connect
raise socket.error, msg
error: (110, 'Connection timed out')
the line numbers may vary, depending on the stage in which the RPC server did not respond.
I suggest catching the exceptions, and just return the orignal URL to squid (if in squid_part), so service will continue to flow.
There is a small issue with this approach - if the RPC server is listening, and accepting connections, but does not respond to request - I couldn't find any variable that sets a "response timeout".sexcam kostenlos testen
