[medusa] Hideously long selects? (original) (raw)

Skip Montanaro skip@m...
Tue, 31 Aug 1999 17:31:11 -0500


I'm using the ZServer component of Zope (but nothing else) behind an Apache serving as a proxy. I've noticed situations where it seems like I my ZServer process is hung, but when I connect to it with strace (Linux RH 5.2) I see it stalled in a select waiting on a lot of input file descriptors with an absurdly long timeout (typically 30 seconds):

select(33, [6 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 32], [], [], {30, 0}

I'm not much of a select expert, but it seems to me that this is what's causing my problem. Let's assume all those file descriptors are wacko web browsers (not a big stretch), so they aren't going to send input any time soon, so it will be a long time before Medusa falls out of the select call and gets around to thinking about new connections, right? Shouldn't the timeout be substantially shorter, 0.5-2.0 seconds perhaps?

I haven't checked the medusa code yet (that's where I'm headed next), but I thought I'd check to see if I'm way off-base before I start messing around in detail.

Thx,

Skip Montanaro | http://www.mojam.com/ skip@m... | http://www.musi-cal.com/~skip/ 847-971-7098 | Python: Programming the way Guido indented...