0rpc / zerorpc-python

zerorpc for python
http://www.zerorpc.io
Other
3.18k stars 382 forks source link

fd leak? #260

Open easonqing opened 1 year ago

easonqing commented 1 year ago

here is my client code:

class AgentAction(object): def init(self, agent_ip, timeout=60): self.agent_ip = agent_ip self.timeout = timeout self.rpc_address = "tcp://%s:%s" % (self.agent_ip, 5000)

def test_action(self, arg1):
    c = ZeroRpcClient(prefix="Agent1", heartbeat=None, timeout=self.timeout)
    c.connect(self.rpc_address)
    ret = c.test_action(arg1)
    c.close()
    return ret

when I run the test_action repeatedly, I found leak of several fds like these: python 8041 rtrs 30u a_inode 0,12 0 12760 [eventpoll]

so what happened? how to avoid this? thanks!

bombela commented 1 year ago

Can you tell by any chances if it is from the gevent ioloop or zmq?