[Twisted-Python] epollreactor for pyicq-0.6-t
exarkun at divmod.com
Tue Jan 8 10:03:03 EST 2008
On Tue, 8 Jan 2008 22:50:54 +0800, Steven ZHOU <steven_zhou at ctl.creative.com> wrote:
>I hope some one could offer me some help on this. I am quite new to both
>python and twisted.
>The thing I do may sounds a bit wierd. I am using a pyicq-0.6-t. As
>pyicq-0.6-t only works with twisted-2.2 or earlier, so I chose to install
>twisted-2.2. However, I wished to use epollreactor as the default
>selectreactor only supports 1024 file descriptors. So I copied the relevant
>files of epollreactor which is installed on twisted-2.5 to the
>site-packages/twisted-2.2 directory. I copied 5 files in the total,
>epollreactor.py, epoll..pyx to the twisted/internet directory, _epoll.py
>_epoll.pyc and _epoll.so to twisted/python directory. I can't remember the
>exact file names. I copied it with a hope that it works. I am not sure
>whether I am doing thing stupid here. correct me if I am.
I don't know if this works. I've never tried it. The epoll reactor
implementation shares code from other parts of Twisted. It may be
the case that that code changed between Twisted 2.2 and Twisted 2.5
in a way which will prevent epollreactor from working. It may also
be the case that it hasn't.
>The thing is, after I changed the reactor.py to import epollreactor,
>pyicq-0.6-t seems to be using epollreactor but it still can only supports
>1024 open sockets. I thought the problem is only in selectreactor? I
>figured this out by doing a netstat -a -n on linux and found that
>pyicq-0.6-t only opened about 1017 maximum concurrent sockets. I presume
>that would mean only around 1000 connections can be made.
>Although strange, but I do have a reason to use pyicq-0.6-t which is an
Are you using Python 2.4.3? This sounds like it may be related to the
issue described here:
More information about the Twisted-Python