[Jsonrpc-cpp-devel] Re : Bug report : Accept connexions
Brought to you by:
s-vincent
From: <seb...@cp...> - 2012-03-27 11:04:20
|
Hi, Thank you. You are right, effectively TCP sockets are not closed prior being removed from the list. This will be fixed asap when I go back home. Best regards, -- Seb Envoyé depuis mon HTC ----- Reply message ----- De : "PEI Normandie" <pei...@gm...> Pour : <jso...@li...> Objet : [Jsonrpc-cpp-devel] Bug report : Accept connexions Date : mar., mars 27, 2012 03:29 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 |