On Nov 3, 2011, at 6:18 PM, Tobias Oberstein wrote:

>      while not self.stopped:
>         if select.select([conn], [], [], self.timeout) == ([], [], []):
>            pass

Please note that on high-volume servers, this is problematic, as 'conn' may be 
higher than the maximum file descriptor pollable by select().  So if you've 
tuned everything to be smart, use a high-volume reactor like epoll, and set all 
your ulimits correctly, you will still get tracebacks out of this code 
depending on random accidents of ordering.

This part of the logic might therefore be better implemented as a 
IReadDescriptor/IWriteDescriptor provider (i.e. a subclass of FileDescriptor), 
assuming you can ask your postgres binding to give you non-blocking reads and 
writes.  You're certainly not the first person to make this mistake though, 
<http://divillo.com/> gives the same advice :).

Also this would probably make a better patch for txpostgres 
<https://launchpad.net/txpostgres> than for Twisted itself, since support 
depends on specific database bindings.

-glyph

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to