Login very slow, other operations ok

I'm running EJabberd 2.0.4 on OSX, which I installed from the package on this site. I'm having a problem that, when I connect to an account on the server it takes a very long time to login, about 10-15 seconds each time. Once logged in, everything is fast. Messages go through quickly, logging out is fast. It's just that initial connection that's a problem. It happens every time, on multiple accounts, and from different clients. I don't see any problems in the logs.

Any suggestions on what might be going on and how I resolve it? Thanks in advance.

Ideas that you can investigate

dbradley wrote:

I'm running EJabberd 2.0.4 on OSX, which I installed from the package on this site. I'm having a problem that, when I connect to an account on the server it takes a very long time to login, about 10-15 seconds each time. Once logged in, everything is fast.

You should check if the delay happens before ejabberd receives the TCP connection or after it receives it.

Try to login with the client. Check immediately the ejabberd.log file. Does it show immediately the connection attempt, or does it take 10-15 seconds to display it?

If not using the default auth method (internal Mnesia DB), the delay could be introduced by the remote auth system (LDAP, script, ODBC or whatever).

You could also try to sniff the network traffic (using Wireshark for example), either in your client machine or in the server, to see how delays the communication: your client or your server, and in which state (providing the password, providing a challenge response...).

If you have a very large roster, the delay could be in getting the contacts. Or if the contacts are in remote servers, maybe it takes ejabberd several seconds to connect to those servers to get your contact's status. You could try to login in your server with an new empty account, without contacts.

Check in your client what stanzas are sent and received during connection, maybe some of them are very large and ejabberd explicitly delays them (option max_stanza_size and shaper).

Syndicate content