Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Debugging DJabberd load issue (probably SSL related)

by cLive ;-) (Parson)
on Feb 15, 2008 at 08:56 UTC ( #668111=perlquestion: print w/ replies, xml ) Need Help??
cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

I've been scratching my head on this one for a few days now, and wonder if I'm losing it, so any input would be appreciated :)

I have a slightly tweaked DJabberd daemon running. After a while, and for no reason that I can determine, the CPU load suddenly shoots up to 97% and sticks.

What's weird is that I'm tailing the XMPP message log, and can't see continual messages (that to me would be indicative of something going on). Well, there are messages that come in bursts, but after that slows down, the CPU stays at 97%. Memory usage is consistent at 21Mb (50Mb virtual).

During this time, I can still send and receive messages with no lag, so I'm wondering what the hell could be hogging the CPU.

strace throws out an almost continual stream of:

epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1 epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1 epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1 epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1 epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1 epoll_wait(11, {{EPOLLOUT, {u32=25, u64=25}}}, 1000, -1) = 1

A scan of the DJabberd lists shows that this is possibly an SSL error. A search points to it possibly being a timing issue (?) with watching the SSL connections, but it appears that that thread died with no resolution.

I've just disabled SSL in DJabberd (commented out set_config_sslcertificatekey and set_config_sslcertificatefile sets) , and I cannot now recreate the high load problem.

I'm running version 0.83 of DJabberd.

Has anyone encountered this issue before? Or have any idea on how to approach this?

Comment on Debugging DJabberd load issue (probably SSL related)
Download Code
Re: Debugging DJabberd load issue (probably SSL related)
by Anonymous Monk on Feb 15, 2008 at 11:02 UTC
    so you tried different ssl versions and you got?
Re: Debugging DJabberd load issue (probably SSL related)
by cLive ;-) (Parson) on Feb 19, 2008 at 05:41 UTC

    Well, I've tried switching from epoll to poll explicitly in Danga::Socket, and I'm still getting the load issues, only (obviously) this time strace shows (square brackets removed because I can't work out formatting):

    poll({fd=10, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POL +LIN|POLLERR|POLLHUP|POLLNVAL}, {fd=12, events=POLLIN|POLLERR|POLLHUP| +POLLNVAL}, {fd=15, events=POLLIN|POLLERR|POLLHUP|POLLNVAL}, {fd=14, e +vents=POLLIN|POLLERR|POLLHUP|POLLNVAL}, {fd=18, events=POLLIN|POLLERR +|POLLHUP|POLLNVAL}, {fd=13, events=POLLIN|POLLOUT|POLLERR|POLLHUP|POL +LNVAL, revents=POLLOUT}, {fd=16, events=POLLIN|POLLERR|POLLHUP|POLLNV +AL}, {fd=19, events=POLLIN|POLLERR|POLLHUP|POLLNVAL}, 10, -1) = 1 poll({fd=10, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POL +LIN|POLLERR|POLLHUP|POLLNVAL}, {fd=12, events=POLLIN|POLLERR|POLLHUP| +POLLNVAL}, {fd=15, events=POLLIN|POLLERR|POLLHUP|POLLNVAL}, {fd=14, e +vents=POLLIN|POLLERR|POLLHUP|POLLNVAL}, {fd=18, events=POLLIN|POLLERR +|POLLHUP|POLLNVAL}, {fd=13, events=POLLIN|POLLOUT|POLLERR|POLLHUP|POL +LNVAL, revents=POLLOUT}, {fd=16, events=POLLIN|POLLERR|POLLHUP|POLLNV +AL}, {fd=19, events=POLLIN|POLLERR|POLLHUP|POLLNVAL}, 10, -1) = 1

    etc. Oh funky. Oh well - at least that's one part of the equation marked off...

    Time to start chasing the SSL options....

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://668111]
Approved by ysth
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-07-29 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (212 votes), past polls