Re: [Twisted-Python] most efficient new connection rate limiting?

2009-02-04 Thread Stephen Thorne
On 2009-02-04, Alec Matusis wrote: > 1) Create an dictionary {ip1:count1, ip2: count2, .} in the server, and > check the counts for each incoming connection. > Disconnect with transport.loseConnection() if the threshold for ip:count is > exceeded. > Reset this dictionary to empty dict {} every min

Re: [Twisted-Python] Twisted Conch SSH timeout

2009-02-04 Thread Paul Swartz
On Wed, Feb 4, 2009 at 11:49 AM, ray terrill wrote: > Could you give me an example of how handling the connectionLost() could be > accomplished? I'm not sure where I need to integrate that into what I've > already got. For example: class ClientCommandTransport( transport.SSHClientTransport):

[Twisted-Python] most efficient new connection rate limiting?

2009-02-04 Thread Alec Matusis
We need to limit the new connection rate from a given IP, such that for example 10.10.1.10 cannot connect more often than 10 times per minute. This is a high-volume TCP Twisted server, with about 500 new distinct IP connections per second in the normal state (and we run 8 of these on each 8 core s

Re: [Twisted-Python] installation help

2009-02-04 Thread Arie Lakeman
Hi, Firstly, I either use the built-in version of Idle on mac which is 2.5, or I'm using ActivePython 2.6, I'm not familiar with binaries so to save time this is what I used. I then install the .dmg of twisted to a file I create on my desktop, then go into sys.path and add /Users/username/Desktop,

Re: [Twisted-Python] Twisted Conch SSH timeout

2009-02-04 Thread ray terrill
Could you give me an example of how handling the connectionLost() could be accomplished? I'm not sure where I need to integrate that into what I've already got. -Ray On Mon, Feb 2, 2009 at 7:32 PM, Paul Swartz wrote: > On Mon, Feb 2, 2009 at 2:22 PM, ray terrill > wrote: > > I've got a Twiste

Re: [Twisted-Python] redefine signal handlers

2009-02-04 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Wed, 4 Feb 2009 10:32:19 +, Reza Lotun wrote: Hi Gabriel, On Wed, Feb 4, 2009 at 10:15 AM, Gabriel Rossetti wrote: Hello everyone, I would like to run some cleanup code when my Twisted app receives a signal (SIGINT/SIGBREAK/SIGTERM). I saw that "_SignalR

Re: [Twisted-Python] Traceback on loseConnection

2009-02-04 Thread Jean-Paul Calderone
On Wed, 04 Feb 2009 11:04:26 +0100, Werner Thie wrote: Hi all My users are complaining that they get the odd disconnect while using my site built with nevow/athena on FreeBSD 7.1 with the poll reactor. I recently switched to twisted 8.2 release and am now observing 199 'Unhandled Error' out

Re: [Twisted-Python] installation help

2009-02-04 Thread Jean-Paul Calderone
On Wed, 4 Feb 2009 13:35:59 +, Arie Lakeman wrote: Hi, I've taken an interest in event driven programming, I came across twisted and liked the look of it, I've tried downloading the .dmg from twistedmatrix/trac unfortunately after trying multiple installations including direct installation t

Re: [Twisted-Python] redefine signal handlers

2009-02-04 Thread Jean-Paul Calderone
On Wed, 4 Feb 2009 10:32:19 +, Reza Lotun wrote: Hi Gabriel, On Wed, Feb 4, 2009 at 10:15 AM, Gabriel Rossetti wrote: Hello everyone, I would like to run some cleanup code when my Twisted app receives a signal (SIGINT/SIGBREAK/SIGTERM). I saw that "_SignalReactorMixin" sets the handlers

[Twisted-Python] RE: [Stackless] Maximum Recursion Depth Error with Twisted 8.2/Stackless 2.6.1

2009-02-04 Thread Andrew Francis
Hi Kristjan: Thanks for the explanation and the effort. Tomorrow, I'll hunt down a few things on my end. If you find ToyProcessor5 too convoluted, I'll post the code for another prototype that should be easier to follow. Cheers, Andrew --- On Tue, 2/3/09, Kristján Valur Jónsson wrote: > Fro

[Twisted-Python] installation help

2009-02-04 Thread Arie Lakeman
Hi, I've taken an interest in event driven programming, I came across twisted and liked the look of it, I've tried downloading the .dmg from twistedmatrix/trac unfortunately after trying multiple installations including direct installation to both the folder where python is found (under system/fram

Re: [Twisted-Python] redefine signal handlers

2009-02-04 Thread Reza Lotun
Hi Gabriel, On Wed, Feb 4, 2009 at 10:15 AM, Gabriel Rossetti wrote: > Hello everyone, > > I would like to run some cleanup code when my Twisted app receives a signal > (SIGINT/SIGBREAK/SIGTERM). > > I saw that "_SignalReactorMixin" sets the handlers and that "ReactorBase" > defines the default h

[Twisted-Python] redefine signal handlers

2009-02-04 Thread Gabriel Rossetti
Hello everyone, I would like to run some cleanup code when my Twisted app receives a signal (SIGINT/SIGBREAK/SIGTERM). I saw that "_SignalReactorMixin" sets the handlers and that "ReactorBase" defines the default handlers : def sigInt(self, *args): """Handle a SIGINT interrupt.

[Twisted-Python] Traceback on loseConnection

2009-02-04 Thread Werner Thie
Hi all My users are complaining that they get the odd disconnect while using my site built with nevow/athena on FreeBSD 7.1 with the poll reactor. I recently switched to twisted 8.2 release and am now observing 199 'Unhandled Error' out of 298436 logged requests with the following traceback.