[Twisted-Python] How Twisted is This?

Michal Wallace michal at sabren.com
Thu Jul 17 10:28:49 EDT 2003

On Wed, 16 Jul 2003, Brad Bollenbach wrote:

> Well, I'm sure I mean I want to block.
> Unless I don't (in which case Twisted would have to prove to me that I
> don't).
> Here's an example use case for a monitoring check:
> 1. open web page and store cookie that it gives us
> 2. did we get the page ok? (yes)
> 3. submit the form with values foo=bar and baz=spam (and the cookie we 
> got in step 1)
> 4. did the response get retrieved ok? (yes)
> 5. is the string "Welcome to blah blah blah" present in this page? (no)
> 6. return a "NOT OK" for this monitor

Hmm. I run a site that monitors several hundred web pages 
every hour. I'd have to agree that blocking isn't the best

What if the site is down? Or for some reason is really
slow? And it takes several minutes to fetch each page?
Then 5 minutes later, your monicron tool fires up again,
but the first one isn't even finished, and so on. Pretty
soon your server has 2039482304 python instances in memory.

If you're using a timeoutsocket, you might be okay, but 
even then a few timeouts in a row can make your execution
time needlessly long.

Michal J Wallace
Sabren Enterprises, Inc.
contact: michal at sabren.com
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/

More information about the Twisted-Python mailing list