Hi Nathan,<br><br>because you're using json_rpc synchronous requests - call, you must keep-alive it with steps 5s/request. <br><div dir="ltr">It think you have to set : session timeout = 5s (gen_server:call default time out is 5000ms).<br>
<br>resp = proxy.rpccall("/rpc/rabbitmq", "open", ["guest", "guest",<b>5</b>,"/"])<br><br>i think you should not set http channel session timeout to large <br><br>Cuong,<br>
</div><br>This is result dump on my server when run <b>stupidRpc.py</b> script :<br><br>==============================<div id=":e1" class="ii gt">====<br>Calling /rpc/rabbitmq, open, ['guest', 'guest', 5, None]<br>
<br>connect: (localhost, 55672)<br>
send: 'POST /rpc/rabbitmq HTTP/1.1\r\nHost: localhost:55672\r\nAccept-Encoding: identity\r\nContent-Length: 84\r\nContent-Type: application/json; charset=UTF-8\r\nAccept: application/json\r\nUser-Agent: python\r\n\r\n'<br>
send: '{"version": "1.1", "params": ["guest", "guest", 9, null], "id": 0, "method": "open"}'<br>-----------------------<br>reply: 'HTTP/1.1 200 OK\r\n'<br>
header: Server: inets/5.0.13
<br>header: Date: Thu, 06 Aug 2009 03:17:48 GMT
<br>header: Content-Length: 80
<br>header: Content-Type: text/plain
<br>body:<br>{"version":"1.1","id":0,"result":{"service":"B959C017343A362D4539668F9D6BA37F"}}<br>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br>got channel: B959C017343A362D4539668F9D6BA37F<br>
<br>==================================<br>Calling /rpc/B959C017343A362D4539668F9D6BA37F, poll, []<br><br>send: u'POST /rpc/B959C017343A362D4539668F9D6BA37F HTTP/1.1\r\nHost: localhost:55672\r\nAccept-Encoding: identity\r\nContent-Length: 59\r\nContent-Type: application/json; charset=UTF-8\r\nAccept: application/json\r\nUser-Agent: python\r\n\r\n'<br>
send: '{"version": "1.1", "params": [], "id": 1, "method": "poll"}'<br>-----------------------<br>reply: 'HTTP/1.1 200 OK\r\n'<br>header: Server: inets/5.0.13
<br>header: Date: Thu, 06 Aug 2009 03:17:52 GMT
<br>header: Content-Length: 36
<br>header: Content-Type: text/plain
<br>body:<br>{"version":"1.1","id":1,"result":[]}<br>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><br><br><div class="gmail_quote">On Thu, Aug 6, 2009 at 1:39 AM, Nathan Gray <span dir="ltr"><<a href="mailto:n8gray@n8gray.org">n8gray@n8gray.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Cuong,<br>
<div class="im"><br>
On Tue, Aug 4, 2009 at 8:20 PM, Cuong Le<<a href="mailto:cuonglb@facemain.com">cuonglb@facemain.com</a>> wrote:<br>
> Hi Nathan,<br>
><br>
</div><div class="im">> Ah ha, because HTTP Channel was closed by timeout handle_info spontaneous.<br>
> You must keep-alive it until make json_rpc call close it.<br>
<br>
</div>I'm afraid that's not it. The HTTP channel times out after 15<br>
seconds, but the timeout that's giving me headaches happens after only<br>
5 seconds.<br>
<br>
BTW, I set things up on my Ubuntu machine, using the same versions of<br>
everything and got the same problem. I also tried out the javascript<br>
example code and it seems to work fine, so I guess I'm just doing<br>
something wrong on the client side. I'm attaching my VERY simple (50<br>
line) python client code. Can somebody take a look at it and see if<br>
they can spot the problem?<br>
<div class="im"><br>
> Can you chat with me? at : <a href="mailto:cuonglb@jabber.org">cuonglb@jabber.org</a><br>
<br>
</div>Sure, I'll try to catch you. Thanks!<br>
<div><div></div><div class="h5"><br>
Cheers,<br>
-n8<br>
<br>
--<br>
<a href="http://n8gray.org" target="_blank">http://n8gray.org</a><br>
</div></div></blockquote></div><br>