Openerp压力测试:多线程直连OE Server NET-RPC/XML-RPC端口测试
-
[quote author=Joshua link=topic=2556.msg8470#msg8470 date=1313225229]
LZ我用你代码测试过,没改self.socket.listen(5)和db_maxconn = 128也可以运行,但是多次出现了下面错误(而且就算改了源码,错误依旧),error: (10061, 'Connection refused')
[/quote]
error: (10061, 'Connection refused')
连接被拒绝,socket 的等待队列默认值才5,多于5个并发就挂了啊,所以才需要修改 socket.listen。 -
lz参数设置就是按照你上面所设置的,这个是其中一个出错信息。
我用的源码也是6.0.2Exception in thread Thread-99:<br />Traceback (most recent call last):<br /> File "C:\Python25\lib\threading.py", line 486, in __bootstrap_inner<br /> self.run()<br /> File "C:\Python25\lib\threading.py", line 446, in run<br /> self.__target(*self.__args, **self.__kwargs)<br /> File "D:\eclipse_workspace\oes602\bin\test\yaliceshi.py", line 44, in thread<br /> company = conn.get_object('res.partner').read([(1)],[('name')])<br /> File "D:\eclipse_workspace\oes602\bin\test\openerprpc-1.0.1\openerprpc\__init__.py", line 240, in proxy<br /> self.connection.check_login()<br /> File "D:\eclipse_workspace\oes602\bin\test\openerprpc-1.0.1\openerprpc\__init__.py", line 209, in check_login<br /> self.user_id = Service(self.connector,"common").login(self.database, self.login, self.password)<br /> File "D:\eclipse_workspace\oes602\bin\test\openerprpc-1.0.1\openerprpc\__init__.py", line 178, in proxy<br /> result = self.connector.send(self.service_name, method, *args)<br /> File "D:\eclipse_workspace\oes602\bin\test\openerprpc-1.0.1\openerprpc\__init__.py", line 76, in send<br /> return getattr(service, method)(*args)<br /> File "C:\Python25\lib\xmlrpclib.py", line 1147, in __call__<br /> return self.__send(self.__name, args)<br /> File "C:\Python25\lib\xmlrpclib.py", line 1437, in __request<br /> verbose=self.__verbose<br /> File "C:\Python25\lib\xmlrpclib.py", line 1183, in request<br /> self.send_content(h, request_body)<br /> File "C:\Python25\lib\xmlrpclib.py", line 1297, in send_content<br /> connection.endheaders()<br /> File "C:\Python25\lib\httplib.py", line 860, in endheaders<br /> self._send_output()<br /> File "C:\Python25\lib\httplib.py", line 732, in _send_output<br /> self.send(msg)<br /> File "C:\Python25\lib\httplib.py", line 699, in send<br /> self.connect()<br /> File "C:\Python25\lib\httplib.py", line 683, in connect<br /> raise socket.error, msg<br />error: (10061, 'Connection refused')