[Twisted-web] txJSON-RPC, deferred, and longpolling ajax -- limited number of connections, setting
awbuga at gmail.com
Mon Mar 25 13:43:24 EDT 2013
I'm writing a simple JSONRPC server that is intended to have a number of
longpolling http connections.
-On the server side, I'm using txJSON-RPC and utilizing returning deferred
(which translate into NOT_DONE_YET at the next layer).
-On a clientside, I'm using JQuery to kick off a longpolling ajax POST to
the rpc interface.
Upon the requests arrival to the RPC server I returned a Deferred, adding
it to my list. The POST should only return data (finish the request) once
the server side has some changed state. It works for basic tests.
However, once I increase the number of outstanding connections, I don't see
any more connections accepted from my browser. I seem to be capped at 6
open connections. If I start a new browser, ie: chrome, or even change the
URL from localhost to 127.0.0.1 I'm able to open another 6.
I've never done much server programming so I'm a bit confused as to where
to look to fix this. I've import pdb and set_trace() all the way down to
the tcp.py part and I still don't see any activity coming in.
What steps should I take to identify and fix this limitation? Any help
would be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-web