<div dir="ltr"><div>Hi Cubicweb Team,</div><div><br></div><div>Just let you know my feedback on rqlcontroller.</div><div><br></div><div>Therefore recently I imported all the data using rqlcontroller over http(s). It works very well for small set of data. However, considering a large data set, sometimes I fail to get response after I post data to the server. It may be caused by too frequent http-post on cubicweb server. Or rqlcontroller try to protect server from DOS attack. Or it is a problem in <i>requests. </i>I found a solution that I need to set up a timeout parameter for the <i>requests</i> to avoid unlimited waiting.  Please see the example as below. The test script and server is running on the same machine. The network is stable. I hope this feedback is useful for you.</div>
<div><br></div><div>Regards,</div><div>Jinpeng</div><div><br></div><div><br></div><div>Test script:</div>```<br><div class="gmail_extra"><div class="gmail_extra">import json</div><div class="gmail_extra">import uuid</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">try:</div><div class="gmail_extra">    # ensure a recent request lib is available</div><div class="gmail_extra">    import requests</div><div class="gmail_extra">
    assert [int(n) for n in requests.__version__.split('.', 2)][:2] >= [1, 2]</div><div class="gmail_extra">except (ImportError, AssertionError):</div><div class="gmail_extra">    requests = None</div><div class="gmail_extra">
<br></div><div class="gmail_extra">if __name__ == "__main__":</div><div class="gmail_extra">    for i in xrange(10000):</div><div class="gmail_extra">        print "=" * 30</div><div class="gmail_extra">
        print "step %d" % i</div><div class="gmail_extra">        unique_filename = uuid.uuid4()</div><div class="gmail_extra">        args = [('INSERT Subject S: S identifier "%(name)s"',</div>
<div class="gmail_extra">                 dict(name=str(unique_filename))), ]</div><div class="gmail_extra">        base_url = '<a href="http://localhost:8080">http://localhost:8080</a>'</div><div class="gmail_extra">
        r = requests.Session()</div><div class="gmail_extra">        a = r.get(base_url + "?__login=admin&__password=admin")</div><div class="gmail_extra">        print a.status_code</div><div class="gmail_extra">
        a = r.post(base_url + "/rqlio/1.0",</div><div class="gmail_extra">                   data=json.dumps(args),</div><div class="gmail_extra">                   headers={'Content-Type': 'application/json'})</div>
<div class="gmail_extra">        output_rql = a.json()[0]</div><div class="gmail_extra">        print a.status_code</div><div class="gmail_extra">        print output_rql</div></div><div class="gmail_extra">```</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Output:</div><div class="gmail_extra">```</div><div class="gmail_extra"><div class="gmail_extra">==============================</div><div class="gmail_extra">step 0</div><div class="gmail_extra">
200</div><div class="gmail_extra">200</div><div class="gmail_extra">[[2345]]</div></div><div class="gmail_extra">.</div><div class="gmail_extra">.</div><div class="gmail_extra">.<br><div class="gmail_extra">==============================</div>
<div class="gmail_extra">step 31</div><div class="gmail_extra">200</div><div class="gmail_extra">200</div><div class="gmail_extra">[[2376]]</div><div class="gmail_extra">==============================</div><div class="gmail_extra">
step 32</div><div class="gmail_extra">200</div><div class="gmail_extra">200</div><div class="gmail_extra">[[2377]]</div><div class="gmail_extra">==============================</div><div class="gmail_extra">step 33</div><div class="gmail_extra">
200</div><div class="gmail_extra"><br></div><div class="gmail_extra">Freezing</div>```<br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 4:39 PM, Florent Cayré <span dir="ltr"><<a href="mailto:florent.cayre@logilab.fr" target="_blank">florent.cayre@logilab.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi,<br>
      <br>
      some comments below.<br>
      <br>
      Be aware that as expected, we just released signedrequest +
      rqlcontroller (for now in
      <a href="http://download.logilab.org/acceptance/" target="_blank">http://download.logilab.org/acceptance/</a>).<br>
      <br>
      Your feedback is very welcome if you find any time to test them.<br>
      <br>
      Cheers,<br>
      Florent.<br>
      <br></div></div></blockquote></div><br></div></div>