-
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:
-
On which browser did you found this issue?
-
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 serverbosh/max-inactivity[L]=30
where 30 is new inactivity timeout value
-
-
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.
Type |
Bug
|
Priority |
Normal
|
Assignee | |
RedmineID |
1551
|
Version |
tigase-server-5.2.0
|
Spent time |
0
|
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.