Projects tigase _server server-core Issues #237
Bosh Disconnecting After 10 Minutes on Webkit based browsers (#237)
Closed
Subir Jolly opened 1 decade 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.

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.

Artur Hefczyc commented 1 decade ago

Andrzej, could you please have a look at it at your earliest convenience? I think you are most familiar with Bosh code at the moment but if you think somebody else is more qualified for the issue please reassign.

Subir Jolly commented 1 decade ago

Artur, do you have any timeline on this issue as to when you can get to it?

Andrzej Wójcik (Tigase) commented 1 decade ago

I just replicated this issue with disconnection after 10 minutes using Chrome browser and it looks like after 10 minutes browser decided to execute another check for permission for using CORS and this request took 10 seconds which caused next request with data to wait more than 10 seconds which caused to trigger inactivity timer on server side which is by default set to 10 seconds.

Few questions:

  1. On which browser did you found this issue?

  2. Did you tried using other browser?

You can change default value for inactivity timeout by adding following line to etc/init.properties file on server side and restarting server

bosh/max-inactivity[L]=30

where 30 is new inactivity timeout value

Subir Jolly commented 1 decade ago

It was a good catch on your side. I tested this issue in 4 browsers(Chrome, Safari, IE and Firefox). I am noticing this issue only in 2 browsers which are Chrome and Safari. I also updated the max inactivity time to 30 and still having the same issue.

Andrzej Wójcik (Tigase) commented 1 decade ago

I changed implementation of CORS protocol for BOSH, as until now we were prepared for receiving OPTIONS request only as first request on connection and it was ok, but as you use keep-alive and Webkit based browsers decided to reuse existing connection and execute additional OPTIONS request on same connection it caused BOSH timeout.

From now on Tigase will respond to OPTIONS request send any time and as it will respond without delay then inactivity timer will not be called and BOSH connection will not be closed.

Subir Jolly commented 1 decade ago

Oh great. Thanks so much. So when is this fix going to be out? In beta4 or later?

Andrzej Wójcik (Tigase) commented 1 decade ago

It should be released in beta4 and will be part of nightly builds as well

Subir Jolly commented 1 decade ago

Any update on when beta4 will be out?

Thank you.

Artur Hefczyc commented 1 decade ago

Probably this week.

Subir Jolly commented 1 decade ago

Thank you so much for the update.

Subir Jolly commented 1 decade ago

Any update on this fix?

Subir Jolly commented 1 decade ago

I believe this has been released in rc1. Is that what we can use?

Artur Hefczyc commented 1 decade ago

Yes, please try the RC1. All fixes are there.

Subir Jolly commented 1 decade ago

Thank you so much.

Subir Jolly commented 1 decade ago

Tested. Works fine. Thank you so much :)

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
1551
Version
tigase-server-5.2.0
Spent time
24h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#237
Please wait...
Page is in error, reload to recover