Ok everyone, I've done quite a bit of testing on this using  
jabber.org.au servers, and here's what I've found so far.

JOA has two machines I've been playing with. wombo  
(dev.jabber.org.au) and nutsy (jabber.org.au)

nutsy is running Linux 2.6.12, with ejabberd 1.1.1
wombo is running Linux 2.6.8 with ejabberd 1.1.1

nutsy has several hundred concurrent users, wombo has only me :)

There are two instances of PyMSNt on nutsy. One is msn.jabber.org.au,  
connected to the nutsy ejabberd, the other is msn.dev.jabber.org.au,  
connected to the wombo ejabberd.

They have identical configurations, except for <jid/> and <mainServer/ 
 >. They're both using Twisted 2.2 with epoll, and Python 2.4

I added a LogEvent(INFO, "Got a message") to PyTransport.onMessage,  
after it has found the session the message is associated with, and  
just before it passes the message off to that session.

I flooded messages using the Psi XML console, so they were all sent  
pretty much simultaneously.

Testing nutsy: Spamming [EMAIL PROTECTED] with 10  
messages results in about half being delivered, and here's the weird  
thing, 3 messages in debug.log for each message (all with the same  
memory address).

Testing wombo: Spamming [EMAIL PROTECTED] with  
10 messages results in all being delivered, and only one statement in  
debug.log per message.

My machine at home behaves identically to wombo. It runs Linux 2.6.8,  
with Twisted 2.2 and epoll. Jabberd2s10.


So, for nutsy, there are two (hopefully related?) anomalies.

Firstly:
A large percentage of messages are not making it to  
PyTransport.onMessage. This means they're either getting dropped by  
ejabberd, or by Twisted.
I'm inclined to trust ejabberd here. But then the exact same Twisted  
setup works fine on two other machines.


Secondly:
3 debug statements are printed for each message. This means that line  
of code I added is being executed 3 times, or there's something wrong  
with the LogEvent code in debug.py
Neither of these seem likely. The LogEvent code works fine for  
everything else. Indeed exactly one debug statement is printed once  
the message gets to Session.onMessage. For that code to be being  
executed 3 times, the message would have to be delivered to the  
function 3 times. But Session.onMessage only gets the message object  
once.



I'm kind of at a loss as to what's going on here. I would really  
appreciate anybody's insight.

Thanks!

---

James

Reply via email to