New to Riak, hitting a connection limit
doug.muth at gmail.com
Fri Aug 3 10:48:09 EDT 2012
On Thu, Aug 2, 2012 at 2:02 AM, Mark Phillips <mark at basho.com> wrote:
> I think you're problem here is that you're front-loading requests.
> You're better off to issue them serially and wait for one to finish
> before issuing the next. Rumor has there's an example of how one might
> do this somewhere in Riaktant , a somewhat dusty but useful sample
> app. I'll dig through it tomorrow if I remember.
Your comment gave me some ideas, so I went and started using the
node-pool module (https://github.com/coopernurse/node-pool) in my test
script. That artificially limited the number of concurrent
connections to whatever number I specified, and solved the problem.
Unfortunately found another issue in node_riak which makes it
unsuitable for production use: unbounded use of network sockets. It
seems that socks aren't being closed/reused properly. At ~250
queries/second, I could start getting EADDRNOTAVAIL errors after about
15k total queries. :-(
Since my workplace is a node.js shop, and I really want to use Riak,
I'm going to take a whack at writing my own node.js driver for Riak.
Would anyone find it useful if I could talk my employer into releasing
it under the GPL?
More information about the riak-users