# Aerospike nodejs client count connection

**URL:** https://discuss.aerospike.com/t/aerospike-nodejs-client-count-connection/2503
**Category:** General Discussion
**Created:** [February 14, 2016, 3:55pm UTC](https://discuss.aerospike.com/t/aerospike-nodejs-client-count-connection/2503 "2016-02-14T15:55:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dmitry\_S](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@Dmitry\_S](https://discuss.aerospike.com/u/Dmitry_S)
#### Post date: [February 14, 2016, 3:55pm UTC](https://discuss.aerospike.com/t/aerospike-nodejs-client-count-connection/2503/1 "2016-02-14T15:55:34Z")

</div>

can someone help with a question? When i use comand: netstat -antu | grep :3000 | grep -v LISTEN | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c always i see maximum 5 conenction per one nodejs worker. For example if i use 2 workers i see 10 connection, if 4 - 20. Nodejs client can use only 5 open connections to aerospike? Whe i use C# i have many more connections.

---

<div class="post-metadata">

### Author: ![Jan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jan/32/1124_2.png) [@Jan](https://discuss.aerospike.com/u/Jan)
#### Post date: [February 15, 2016, 3:47am UTC](https://discuss.aerospike.com/t/aerospike-nodejs-client-count-connection/2503/2 "2016-02-15T03:47:44Z")

</div>

@Dmitry_S, the max. number of connections depends on the number of libuv worker threads you use. The default thread pool size is 4. You can increase the limit by setting the `UV_THREADPOOL_SIZE` environment variable, e.g.

```
$ cd benchmarks
$ UV_THREADPOOL_SIZE=8 node main
info: host: 192.168.33.10 port:3000, namespace: test, set: demo, worker processes: 1, keys: 100000, read: 50%, write: 50%
info: Mon Feb 15 2016 11:33:45 GMT+0800 (SGT) read(tps=4629 timeouts=0 errors=0) write(tps=4628 timeouts=0 errors=0)
...

$ netstat -p tcp -a -n | grep -e .3000 -e .3100 | grep -v LISTEN | awk '{print $5}' | sort | uniq -c
9 192.168.33.10.3000
9 192.168.33.10.3100

```

(Note, I have configured the benchmark to run with a single worker process.)

The one additional connection per node is for the cluster tend process which runs in it’s own, separate thread.

---

<div class="post-metadata">

### Author: ![Dmitry\_S](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@Dmitry\_S](https://discuss.aerospike.com/u/Dmitry_S)
#### Post date: [February 15, 2016, 9:01am UTC](https://discuss.aerospike.com/t/aerospike-nodejs-client-count-connection/2503/3 "2016-02-15T09:01:11Z")

</div>

thanks for you response! Now i try to use process.env.UV\_THREADPOOL\_SIZE=64; in nodejs code and it’s worked.
