Receiving "Too many open files" error on heavy traffic
Geeknux opened this issue · 2 comments
hi, i'm using zerorpc for a service with high concurrent traffic and sometimes i receive this error:
Debug: internal, implementation, error
Error: Uncaught error: Too many open files
at new exports.Socket (/home/geeknux/Projects/netads_core/node_modules/zerorpc/node_modules/zmq/lib/index.js:190:15)
at Object.exports.socket.exports.createSocket (/home/geeknux/Projects/netads_core/node_modules/zerorpc/node_modules/zmq/lib/index.js:605:14)
at Object.client (/home/geeknux/Projects/netads_core/node_modules/zerorpc/lib/socket.js:158:39)
at new Client (/home/geeknux/Projects/netads_core/node_modules/zerorpc/lib/client.js:47:24)
This is an error reported by zmq, because you have too many open files (likely sockets in your case). You are probably creating too many zerorpc client (or possibly servers).
tip: You do not need to instantiate a new zerorpc client for every request.
If you post some of the code using zerorpc here, we can more easily find out what's wrong.
Best,
fx
i found the problem, i just close my client after final request and the problem solved.
Thanks for your reply