red5 disconnect user for too much inactivity

Post your questions and bug-reports about the audio/video streaming add-on based on Red5 Media Server.

Moderators: Lapo, Bax

supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

red5 disconnect user for too much inactivity

Postby supermk88 » 08 Feb 2013, 12:43

Hi, i have watch my server with 50+ people and sometimes i receive this warning from redbox:

http://www.sitospeciale.it/public/files/errorh725.jpg

What can be the cause? i'm using smartfox 1.6.9 with java 7 installed and red5 1.0 RC1 (by copying the SFS_RedBox into the webapps of redbox).
I have read here http://code.google.com/p/red5/issues/detail?id=140 that i must increase the maxhandshake timeout or set the throttle to false (in rc1 i have see that there isn't throttle) i have try with handshake to 90000 but it don't resolve the problem (i think because i don't receive handshake problem but inactivity problem)

I have also read this http://code.google.com/p/red5/issues/detail?id=338 but i don't have understand much.. i must put that mina 2.0.8 snapshot into the lib of red5 or is only for red5 1.0.1? (i can't install 1.0.1 with smartfox 1.6.9 beucase it make a lot of error).

I'm using an intel xeon 3.40ghz 4x core with 16gb or ram and 100mbit of bandwith (but with speedtest at this moment it show 20mbit...)

Do you have any hint for me? thx for answer ^^
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 08 Feb 2013, 14:17

I have try now by using my pc (dual core with 10mb of bandwidth and 4gb of ram) to do server and start 2 smartfoxchatav example and connect them with webcam. After like 40min one client being disconnected from redbox (in log file i read chat request stop but in the client side i read error in the webcam and i can't start a new webcam if i don't refresh the webpage) but i can continue to write in the chat.. what can be the cause?
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 08 Feb 2013, 15:04

I don't know if it can help but all times there is a new stream appear a warning org.red5.server.stream.PlayEngine subscribe to ... provider failed.
But after that warning start correctly the stream
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 08 Feb 2013, 16:11

Now i have try again but this time i open first red5.bat and then start.bat and after 2 hours is again connected the webcam, so maybe it was the problem or a simple slowdown of my network right? but is strange that the client remain connected to smartfox and not to redbox..
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: red5 disconnect user for too much inactivity

Postby rjgtav » 09 Feb 2013, 12:12

Hello,

I'm sorry but this is a very difficult problem do diagnose with just the info you provided.
Can you post the exceptions you're getting on Red5? Can you try using the latest version of red5, if there is any?
Can you debug the example on Flash and see if there are any exceptions?

If it remains connected to SFS but not to Red5 is because something broke between the client and red5. Red5 and SFS are 2 different connections made from the client, that's why redbox can fail while SFS remains active. Redbox can't remain active if SFS fails as the API automatically disconnects the user from Red5 in the case of any error with SFS.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 09 Feb 2013, 17:53

Hi ^^ for the first post i have made with this error http://www.sitospeciale.it/public/files/errorh725.jpg i have try to emulate with my computer but after 3 hours it remain connected perfectly (so maybe that warning happear only to some user with bad connection or for the bad server bandwidth i don't know..).

Instead for the last problem that i have tell you i have try all day but without opening 2 smartfox chat with the same browser and it work good (when i try to log with 2 google chrome for example and connect each other with webcam maybe after some time there is that problem but there aren't exeption in red5).

I'm using the red5 version 1.0 (the last work only with smartfox 2x i think and i don't have that license :( )

In 10 days i change the server machine (with a quad core and 100mbit of bandwidth and then i say if there are problem).

Ah and i follow your suggestion of the ping every 200 second on smartfox and is strange that this exeption happear http://www.sitospeciale.it/public/files/errorh725.jpg... maybe a problem with bandwidth of the client or server that don't receive that ping and then it being disconnected from redbox for idle time?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: red5 disconnect user for too much inactivity

Postby rjgtav » 10 Feb 2013, 00:47

Hello,

I'm sorry but I didn't fully understand your post. Which ping are you referring to? Are you pinging sfs or redbox? And how?

Thanks
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 10 Feb 2013, 02:33

Ah sorry :P i mean the ping that you have say in other post to send a ping every 200 second to sfs for prevent disconnection (without that ping idle user log out in 10/20min if they don't write also if max user idle time is set to 60min) and i have read in some old post that is recommended for prevent also disconnection from redbox (in this post viewtopic.php?t=13177).
I have put this code into client side with a timer that send it every 200 sec :

public function sendpacket(e:TimerEvent):void{

var obj:Object = new Object();
obj.keepAlive = true;
smartFox.sendObject(obj);

}

they suggest to send it every 15 sec but isn't too heavy for the server?:P
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: red5 disconnect user for too much inactivity

Postby rjgtav » 10 Feb 2013, 12:59

Oh, I thought you were already sending some keepAlive messages.
Sending a message every 15 secs is not heavy for the server, don't worry.
I only suggest you to decrease the variables name, like "kA" or just "a" instead of "keepAlive", to keep the packets size to the minimum.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 02 Mar 2013, 13:38

Hi sorry if i post again here but the problem remain.. we have bought a new server with 100mbit of bandwidth and the dropped message are decreased very much (only 1 or 2 people disconnected in 1 day) but in the log of red5 (i use the version 1.0 rc1) there are often a message like this:

2013-03-01 17:02:21,376 [NioProcessor-1] INFO o.red5.server.net.rtmp.RTMPHandler - Connecting to: [WebScope@5d1ca65d Depth = 1, Path = '/default', Name = 'SFS_RedBox']
2013-03-01 17:02:22,546 [Red5_Scheduler_Worker-2] WARN o.r.server.net.rtmp.RTMPConnection - Closing RTMPMinaConnection from 151.73.204.33 : 19783 to 46.28.0.143 (in: 3609 out 3850 ), with id 294, due to too much inactivity (60553ms), last ping sent 1000ms ago
2013-03-01 17:02:22,547 [Red5_Scheduler_Worker-2] WARN o.r.server.net.rtmp.RTMPConnection - This often happens if YOUR Red5 application generated an exception on start-up. Check earlier in the log for that exception first!

I have the code that ping sfs every 200 seconds what can i do to prevent this? maybe the version 1.0 isn't compatible with smartfox 1x?
The strange thing is that today i being disconnected from red5 and coudln't be able to start again the cam (only if i reopen the web page) and in the log of redbox no error appears (like a normal disconnect)

Hope that someone can help ^^
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: red5 disconnect user for too much inactivity

Postby rjgtav » 02 Mar 2013, 16:00

Hello,

I've found this link which may help you in solving the issue:
https://code.google.com/p/red5/issues/detail?id=140

Cheers
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 02 Mar 2013, 18:50

hi thx i have read that post but unfortunaly in the version that i have downloaded don't exist the throttle to set to false (i have try to download that version but make some error when i try to put the sfs_redbox into webapps). I have found this interesting page http://osflash.org/pipermail/red5_osfla ... 10650.html of an user that use correctly red5 0.6rc3 but the download page is expired -_-
Here they have the same problem
http://osflash.org/pipermail/osflash_os ... 13587.html
and he "resolved" (is good that for 1 day is stable but with my red5 server that error happear every 40min or so) with the version 0.6 rc3

What can i do?:P
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 03 Mar 2013, 15:28

I have notice (with smartfox a/v conference) that if i enable webcam after like 1 hour it being disconnected, and also if i enable and then disable webcam, after 1 hour i'm not be able to enable it again but if i don't enable webcam i can wait also 3/4 hour and then i can enable it. How can help this information? it seem that redbox close always the connection after 1 hour (also if a user close before the webcam and then the only thing to do is open again the web page)
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 03 Mar 2013, 19:54

Maybe i have resolve :D i have set the ping to sfs at 5sec (with your code obj.a = true) instead of 200 sec and seem that the stream continue for hours.. but it can make some problem for who have a slow connection send that packet so fast? (like for strangers user that are much far from the server?)

edit: when a user have click on my name (and subscribe my live cast) i being disconnected from red5 :(
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: red5 disconnect user for too much inactivity

Postby supermk88 » 04 Mar 2013, 19:45

I have found this post... http://opencast.jira.com/browse/MH-4158

he say : Problem with red5 0.6.3 (production server in Osnabrück):
- none. But this version is some years old, does not work with Java6, is complicated to install and probably has some some security issues, so that we would not like to recommend this version.

maybe it give some problem (i have java7), now i try to see if the 0.9.1 version can work with smartfox 1x and remove that bugs! i hope so :P

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 18 guests