Project

General

Profile

Bosh Disconnecting After 10 Minutes

Subir Jolly
Added over 5 years ago

Hello,

I am connecting to tigase server 5.2.0 beta3 via bosh using jsjac client. The problem I am seeing is that jsjac bosh client connection disconnects exactly after 10 minutes. The connection doesn't need to be idle to reproduce this behavior. Even if you are sending messages back and forth between 2 users, still the jsjac bosh client gets disconnected. I haven't tried this with any other bosh client yet. I am going to try this next.

I looked into tigase code in BoshConnectionManager and noticed that there is a code for checking the idle connection time(10 minutes). I could not find where "lastTransferTime" was being set for bosh io.

Just wondering if any of you can reproduce this behavior using jsjac and tigase.

Thanks.


Replies (7)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

Are you using a HTTP keep-alive mode for the Bosh connections? If you do not then on each request from a Bosh client there is a new TCP/IP connection (Bosh IO) established between the server and the client. If you use keep-alive then, a possible explanation could be HTTP proxy if you use one.

Added by Subir Jolly over 5 years ago

Hi Artur,

Thanks for the response. I am not using any proxy. Talking about keep-alive, here's the portion of the logs which suggests I am using keep-alive. But I am not 100% sure if I should be doing something else too.

Logs

@POST /http-bind/ HTTP/1.1

Host: :5280

Connection: keep-alive

Content-Length: 162

Origin: http://.com

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36

Content-Type: text/xml; charset=UTF-8

Accept: /

Referer: http:///jsjac/examples/simpleclient.html

Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8@

Thanks.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

It is possible that our Bosh was not tested for keep-alive connections lasting longer than 10 minutes, hence there might be a problem for such connection. Our focus recently was on web sockets. Could you please file a bug report: https://projects.tigase.org/projects/tigase-server/issues/new and we will look at it as soon as possible.

Added by Subir Jolly over 5 years ago

Done. Thank you Artur.

Added by sajan kumar over 3 years ago

Artur Hefczyc wrote:

Are you using a HTTP keep-alive mode for the Bosh connections? If you do not then on each request from a Bosh client there is a new TCP/IP connection (Bosh IO) established between the server and the client. If you use keep-alive then, a possible explanation could be HTTP proxy if you use one.

HI Artur in case of using HTTP proxy is there anyway to keep the connection alive ?

Added by sajan kumar over 3 years ago

Artur Hefczyc wrote:

Are you using a HTTP keep-alive mode for the Bosh connections? If you do not then on each request from a Bosh client there is a new TCP/IP connection (Bosh IO) established between the server and the client. If you use keep-alive then, a possible explanation could be HTTP proxy if you use one.

HI Artur in case of using HTTP proxy is there anyway to keep the connection alive ?

Added by Wojciech Kapcia TigaseTeam over 3 years ago

You need to enforce connection to the exact same Tigase machine and this should be configured in your HTTP proxy.

    (1-7/7)