Open singlecheeze opened 1 week ago
I am still seeing timeouts even after the above edit Total Call Time: 90.1486s
I even edited /opt/osnexus/quantastor/restsrv/restsrv.py
to add a 20 min timeout based on this:
def runService():
server_config = {
'server.socket_host': '127.0.0.1',
'server.socket_port': 5154,
'tools.trailing_slash.on': False,
'server.socket_timeout': 1200
}
cherrypy.config.update(server_config)
cherrypy.tree.mount(QSServer(), '/qstorapi')
cherrypy.tree.mount(QSJSONServer(), '/qstorapi/jsonrpc')
cherrypy.engine.start()
cherrypy.engine.block()
Ah found it, suds needs a timeout set too as jsonRPC just calls SOAP client:
def getClientHandle(username='admin', password='password'):
global soap_client
if soap_client is None:
soap_client = Client(url='file:///opt/osnexus/quantastor/lib/osn.wsdl', location='http://localhost:5152', timeout=1200)
security = Security()
token = UsernameToken(username, password)
security.tokens.append(token)
soap_client.set_options(wsse=security)
return soap_client
Once change is made, restart two services:
sudo systemctl restart qs-jsonrpcd.service
sudo systemctl restart quantastor.service
So in total 3 timeouts need to be configurable, well really two if you want to use the same timeout for jsonRPC and suds
(SOAP), and then from the client side requests
timeout.
For long runnin, non async operations, the client will disconnect before the operation will complete, e.g creating 300 LUNs. I am using QuantaStor array to load test some Kubernetes load testing for k8s CSI.
The only way to the
requests
timeout of choice is to override themake_call
method:I propose changing the constructor of the client class and just adding a timeout, and if not specified default to requests native timeout: