[Jsonrpc-cpp-devel] Bug report : Accept connexions
Brought to you by:
s-vincent
From: PEI N. <pei...@gm...> - 2012-03-27 01:29:20
|
Hi all, Currently working on JSON RPC CPP, TCP Server, I have many concurrent connexions and many many many calls ... After hundreds of calls, the server took 100% CPU load. The select method did not wait. In fact, the call was registered, but the accept method returned false ! After looking at ERRNO, I found out that I had a too many files opened. *The solution was simple :* Close the client file descriptor after the call to be treated. In current (non threaded) version 0.4 : File src/json_tcpserver.cpp line 159, close the m_client before removing them from the std::list I think it is the same for UDP servers ? For the moment, the file descriptors are never closed .... no a good idea :) Hope that helps ! Médéric Salles |