Closed R1ckyG closed 11 years ago
Hi - I was wondering what you ended up discovering here. Thanks
Hi, I'm having a very similar issue. What was the resolution for this? I am using tornado 2.4
I also have this, on Tornado 2.3
Unfortunately, I never found a solution for this and have since switched to node.js. Sorry I'm not more help but Good luck!!
I never found a solution. Sorry I'm not more help but good luck.
thanks for the reply @R1ckyG
Hi, I've been using tornado-redis with tornado-2.3 and have noticed that when a Client object with an open connection leaves scope and is reclaimed by the garbage collector, the file descriptor for the socket object is not closed.
I think this is caused by a reference to a connection object that is saved in a tornado ExceptionStackContext that should have been removed. The reference in the ExceptionStackContext stops the garbage collector from reclaiming the IOStream connected to redis and closing the socket.
I've attached a link to code for the test server I use to recreate the bug. I've also attached a link to a graph showing the references to the IOStream object. To run the server you will need the objgraph module: http://mg.pov.lt/objgraph/ Server code: http://dl.dropbox.com/u/107369108/test_server.py
Reference Graph: http://dl.dropbox.com/u/107369108/tmpEQOP5_.png
Thanks!!!