Getting following TypeError: Cannot read property 'status' of undefined, for concurrent 2000 request

Hi,

I have a simple code to get value from couchbase view using nodejs sdk. it works fine for 1000 request(from apache jmeter). but when i try for 2000 request it fails and throw following error

/xxx/xxx/xxx/xxx/node_modules/couchbase/lib/http.js:15
if (error && response.status < 200 || response.status > 299) {
^
TypeError: Cannot read property ‘status’ of undefined
at ret (/xxx/xxx/xxx/xxx/node_modules/couchbase/lib/http.js:15:26)
at ViewQuery._request (/xxx/xxx/xxx/xxx/node_modules/couchbase/lib/viewQuery.js:157:12)
at ViewQuery.query (/xxx/xxx/xxx/xxx/node_modules/couchbase/lib/viewQuery.js:84:8)
at exports.getData (/xxx/xxx/xxx/xxx/db.js:21:11)
at callbacks (/xxx/xxx/xxx/xxx/node_modules/express/lib/router/index.js:164:37)
at param (/xxx/xxx/xxx/xxx/node_modules/express/lib/router/index.js:138:11)
at pass (/xxx/xxx/xxx/xxx/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/xxx/xxx/xxx/xxx/node_modules/express/lib/router/index.js:173:5)
at Object.router (/xxx/xxx/xxx/xxx/node_modules/express/lib/router/index.js:33:10)
at next (/xxx/xxx/xxx/xxx/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.expressInit [as handle] (/xxx/xxx/xxx/xxx/node_modules/express/lib/middleware.js:30:5)

I m thinking, nodejs sdk is not able manage too many request is there any way we can create pool of connections???

i tried generic-pool in nodejs but it is not working. it fails in destroy function as nodejs sdk doesn’t contain option to release the connection

is there any way we can overcome this problem???