Issues with openfire 3.7.0 and http sessions

First let me express that this might be difficult to explain with out good hard data to work against. Fun stuff huh? But here it goes.

Currently I have 12 servers running Openfire with clustering enabled (with the beta version of the updated clustering plugin). They are all running on CentOS and have fiber between them.

Now the problem is this. We have a home grown IM solution built in jquery and http bindings, which was working great for some time until we implemented multiple user tabs, which allows one person to talk with multiple users at any given time. What this did was allowed one user to have multiple sessions open on the Openfire server. What this caused however was a dramatic increase in sessions (to be expected), but they never seem to die down. They just gradually increase (example: when session numbers should be around 4k, they in fact show to be around 12k) and on top of that servers randomly crash.

I’ve ran a few load tests against the common non-http approach to session generation with up to 20k session and it works great, but once http-bind comes into play it start falling over. Not good.

Has anyone ever seen anything like this? It’s causing us to rethink using Openfire and moving to another platform, which we really don’t want to do.

Any help would be greatly appreciated.



Hi Pat,

Have you tried using punjab for connecting your bosh clients to openfire? Openfire’s bosh implementation has issues and using punjab has worked for me.


What does your “idle connections policy” look like? It’s under server, server settings, client connections.

Closed browser tabs/windows won’t fire an “unavailable” presence update, and AFAIK there’s no reliable way to detect a closing tab/window in Javascript cross-browser (without false positives, and without missing some cases you’d also want covered, and in any case it wouldn’t work in Opera) to send such a stanza pre-close.

I would guess that the wrong settings in there could let those connections stay open indefinitely, even if no-one’s on the other end.

Hi Daryl,

I am testing Jappix mini with Openfire + Punjab (Win2003) but it isn’t work for me… The error was throw for me is below:

2011-08-26 09:33:17-0300 [HTTPChannel,0,] - - [26/Aug/2011:12:33:16 +0000] “POST /http-bind HTTP/1.1” 500 14744 "http://p

risma/NopCommerceStore_ChatAtheneum/Default.aspx" "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Sa


2011-08-26 09:34:00-0300 [HTTPChannel,0,] Unhandled Error

Traceback (most recent call last):

File “C:\Python27\lib\site-packages\twisted\web\”, line 1349, in dataReceived


File “C:\Python27\lib\site-packages\twisted\web\”, line 1563, in _finishRequestBody


File “C:\Python27\lib\site-packages\twisted\web\”, line 1619, in allContentReceived

req.requestReceived(command, path, version)

File “C:\Python27\lib\site-packages\twisted\web\”, line 773, in requestReceived


— —

File “C:\Python27\lib\site-packages\twisted\web\”, line 127, in process


File “C:\Python27\lib\site-packages\twisted\web\”, line 147, in render

body = resrc.render(self)

File “C:\Python27\lib\site-packages\twisted\web\”, line 216, in render

return m(request)

File “C:\Python27\lib\site-packages\punjab\”, line 412, in render_POST

s, d = self.service.startSession(body_tag, xmpp_elements)

File “C:\Python27\lib\site-packages\punjab\”, line 670, in startSession

return self.make_session(self, body.attributes)

File “C:\Python27\lib\site-packages\punjab\”, line 70, in make_session

connect_srv = self.connect_srv

exceptions.NameError: global name ‘self’ is not defined

I don’t know and also don’t find in my search on the internet what can cause this error… Anybody help me with some information about this error?



Hey guys,

I’ve got this error bellow using Jappix Mini with JsJaC on a server with Openfire + Punjab… I don’t know what is happening in this case…

2011-09-05 14:22:01-0300 [HTTPChannel,1,] HEADERS 1315243321.04:

2011-09-05 14:22:01-0300 [HTTPChannel,1,] {‘origin’: ‘http://prisma’, ‘content-length’: ‘264’, ‘via’: ‘1.1 (IIRF v2.1)’, ‘accept-language’: ‘pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4’, ‘accept-encoding’: ‘gzip,deflate,sdch’, ‘x-forwarded-host’: ‘prisma’, ‘x-forwarded-for’: ‘’,‘host’: ‘prisma’, ‘accept’: ‘/’, ‘user-agent’: ‘Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1’, ‘accept-charset’: ‘ISO-8859-1,utf-8;q=0.7,*;q=0.3’, ‘connection’: ‘keep-alive’, ‘referer’: ‘http://prisma/nopcommercestore_chatatheneum/Default.aspx’, ‘cookie’: ‘.ASPXANONYMOUS=RXa54IGizAEkAAAANTE0YTBhYWQtYWJmNC00NWM4LTk2ZDAtOTk3Mjc4MTA0N2N kp_aaBeFasBLVRpBRjNDRRzdFC4syOuqAvM5Hfwv7cVk1; ASP.NET_SessionId=ziuxnu2oigdu2yuvfrppcd50; NOPCOMMERCE.AUTH=6EE583DE9475FC05BC0209121573AD1023CB9439FE52DF22C4D3397B973070 EF09E0E313940BFB564E7C868D6DB6C9423C1F02BDD2F225B361E0582B669FBAA7E9588D9E93349 2 445F7550E64904ED6D172F8D96E5C420544642684E91701F26706478797276B3AF845506434BC8A 5 21A19E7D1603BD4911B890BC11FF8933D7395335245A5FE640367C1722A41AF666; Nop.CustomerSessionGUIDCookie=ca15bbed-e363-4029-889d-e25f24978c12’, ‘x-forwarded-server’: ‘prisma’, ‘content-type’: ‘text/xml; charset=UTF-8’}

2011-09-05 14:22:01-0300 [HTTPChannel,1,] HTTPB POST :

2011-09-05 14:22:01-0300 [HTTPChannel,1,]

2011-09-05 14:22:01-0300 [HTTPChannel,1,] Session Created : 15afc413e7ece8f7015df56130a25453e474103c 1315243321.04

2011-09-05 14:22:01-0300 [HTTPChannel,1,] ================================== 1315243321.04 connect to prisma:5222 ==================================

2011-09-05 14:22:01-0300 [HTTPChannel,1,] Starting factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:01-0300 [-] <class ‘twisted.names.dns.DNSDatagramProtocol’> starting on 64433

2011-09-05 14:22:01-0300 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604150>

2011-09-05 14:22:01-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] <punjab.session.XMPPClientConnector instance at 0x01609030> will retry in 2 seconds

2011-09-05 14:22:01-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] Stopping factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:01-0300 [-] (Port 64433 Closed)

2011-09-05 14:22:01-0300 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604150>

2011-09-05 14:22:03-0300 [-] Starting factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:03-0300 [-] <class ‘twisted.names.dns.DNSDatagramProtocol’> starting on 5566

2011-09-05 14:22:03-0300 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604F50>

2011-09-05 14:22:03-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] <punjab.session.XMPPClientConnector instance at 0x01609030> will retry in 6 seconds

2011-09-05 14:22:03-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] Stopping factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:03-0300 [-] (Port 5566 Closed)

2011-09-05 14:22:03-0300 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604F50>

2011-09-05 14:22:10-0300 [-] Starting factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:10-0300 [-] <class ‘twisted.names.dns.DNSDatagramProtocol’> starting on 64985

2011-09-05 14:22:10-0300 [-] Starting protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604170>

2011-09-05 14:22:10-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] Abandoning <punjab.session.XMPPClientConnector instance at 0x01609030> after 3 retries.

2011-09-05 14:22:10-0300 [twisted.names.dns.DNSDatagramProtocol (UDP)] Stopping factory <punjab.session.Session object at 0x016043B0>

2011-09-05 14:22:10-0300 [-] (Port 64985 Closed)

2011-09-05 14:22:10-0300 [-] Stopping protocol <twisted.names.dns.DNSDatagramProtocol object at 0x01604170>

2011-09-05 14:22:30-0300 [-] ================================== 15afc413e7ece8f7015df56130a25453e474103c 1315243350.3 startup timeout ==================================

2011-09-05 14:22:30-0300 [-] HTTPB Error 200

2011-09-05 14:22:30-0300 [-] HTTPB Return Error: 200 ->

2011-09-05 14:22:30-0300 [-] - - [05/Sep/2011:17:22:29 +0000] “POST /http-bind HTTP/1.1” 200 105 “http://prisma/nopcommercestore_chatatheneum/Default.aspx” “Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1”

Anyone know what cause this error (HTTPB Error 200)? I reviewed configuration Punjab and Openfire and I searched on web about this error but not found anything that help me…

Please, I need urgent help!

Thank you for your attention,