Hey ours was hanging every 3-12 hrs. If you know a bit of java id suggest to try and patch that method anyway and update your server. It will return on null, i think its broken somewhere else passing nulls to this method and then creating a bottleneck if im understanding what steve said. Its seemed to have kept things stable finally so i got some sleep last night. We needed the frame dropping fix for live streams so i couldnt revert !
Luiz Filipe wrote: > Hi Dan, thanks for answer. > > Our application is a Flash Game based on server to client/client to server > methods invocation and some RSO?s as well. > We?re not using any type of streams in the moment, because that i?m thinking > that there is another big problem on Red5, that is not related with > PlaylistSubscriberStream class or memory issues. > Nowadays our server freezes every 4-6 hours, there are a lot of memory and > cpu available on server. > > I hope someone can help us. > > Thanks, > > Luiz Filipe. > > > -----Mensagem original----- > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de > Dan Rossi > Enviada em: domingo, 29 de abril de 2007 14:17 > Para: [email protected] > Assunto: Re: [Red5] RES: red5 blocking connections (FREEZE) > > > Hi there, good to see other people are experiencing this, i had to man > the servers all weekend, check the stream and reboot, because the port > is still up but doesnt accept connections so the service monitor doesnt > pick it up. > > Our java options are like so aparantly you have to set your memory > settings in multiples of 1024K. > > wrapper.java.additional.1=-Xms1024m > wrapper.java.additional.2=-Xmx1536m > > Ive tried using this bit of code to work out my maximum threading > setting although setting the maxmimum made it unstable I think , it was > set to 2700 which was 70 below the actual maximum. > > public class ThreadLimit > extends Thread { > private static boolean stop = false; > > public void run() { > try { > int x = 0; > while (true) { > x++; > Thread.sleep(100); > if (stop) return; > } > } catch (InterruptedException e) { > throw new RuntimeException(e); > } > } > > public static void main(String[] argv) > throws InterruptedException { > long threads = 0; > try { > while (true) { > Thread t = new ThreadLimit(); > t.start(); > threads++; > } > } catch (Error e) { > stop = true; > System.out.println("Died with "+threads+" threads."); > } > } > } > > From the looks of it aparant from all the exception errors possibly > causing the outofmemory problems, the patch that Steven sent worked, it > didnt hang overnight, but I guess the traffic wasnt as bad. Here was the > line to add > > if (message == null) return false; > at the beginning of okayToSendMessage() in PlaylistSubscriberStream.java > > The only bit of code ive added to our app was a port of the virtual > directory feature in FMS in the filenamegenerator bean, the code looks like > > public void setVirtualDirectories(String virtualDirectories) { > vdirectories = new HashMap<String,String>(); > directories = virtualDirectories.split(","); > for (int i = 0; i < directories.length; i++) { > directories[i] = directories[i].trim(); > String[] paths = directories[i].split(";"); > > if (!paths[0].equals("") && !paths[1].equals("")) > { > vdirectories.put(paths[0], paths[1]); > } > } > } > > And the generatefilename method, its a vod app so no need to add one for > recording. > > public String generateFilename(IScope scope, String name, > String extension, GenerationType type) { > String filename; > > filename = playbackPath + name; > > String[] paths = name.split("/"); > > > if ((vdirectories.size() > 0) && vdirectories.containsKey(paths[0])) > { > filename = vdirectories.get(paths[0]) + paths[1]; > } > > log.info("Generated FilePath: " + filename); > return filename; > > } > > Could this cause the memory problems, its never been an issue before. > > Luiz Filipe wrote: > >> Hi Dan, how?re doing. >> >> We?re getting the same problem on our server with Red5, after a while >> (sometimes 4 hours, sometimes 20 hours) Red5 freezes and stop accepting >> > new > >> connections, without show any error on console or log. >> >> Like you we tought in increase our server memory and processor (this could >> be the problem), then we bought a new server with 2Gb Ram and a P4 ht >> processor, but after the upgrade Red5 keeps freezing and rejecting new >> connections after a while. >> >> We configured red5.sh to startup with 1.2Gb Xmx and 512 Xms, but looking >> into our server resources monitor, Red5 was using only 650Mb of Ram after >> the freeze and 25% of CPU, in that manner i can presume that memory and >> > cpu > >> is not the problem. >> We have changed some red5-core.xml settings, increased pollSize to >> > 32(size) > >> and 256(max), but we didn?t see any difference. >> >> On some posts here in Red5 mailing list there is some comments to change >> "sessionConfig.receiveBufferSize" and "sessionConfig.sendBufferSize" on >> red5-core.xml, but i didn?t try out and i don?t know which are the right >> values and if these changes will really help the Red5 freezing problem. >> >> We post this problem here sometimes (with Red5 freeze subject), but until >> now there is no fix for this problem. >> There is also a ticket on Jira (APPSERVER-108) for this problem, but not >> solved yet. >> >> I think that we?re getting the same problem. >> >> p.s: We?re using Red5 0.6r3 and jdk 1.5.0_10 on a Linux Fecora Core 5. Our >> connected clintes average on Red5 is 350 to 400. >> >> Thanks, >> >> Luiz Filipe. >> >> -----Mensagem original----- >> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de >> Dan Rossi >> Enviada em: sexta-feira, 27 de abril de 2007 03:15 >> Para: Red5 public list >> Assunto: [Red5] red5 blocking connections >> >> >> our memory problem is getting worse, now we have no outofmemory errors >> but its failing to accept connections, im not getting any errors as yet. >> It may fail with an out of memory shortly. >> >> Memory usage in the windows process monitor says 170MB, i set a hard max >> limit of 1.6GB and it has 2GB of memory ive never seen it reach more >> than 500MB being used. Virtual memory is 600MB. page faults says 478,000 >> and increases. We've never experienced this before, its even running >> behind a load balancer now with 2 other machines. >> >> _______________________________________________ >> Red5 mailing list >> [email protected] >> http://osflash.org/mailman/listinfo/red5_osflash.org >> >> >> _______________________________________________ >> Red5 mailing list >> [email protected] >> http://osflash.org/mailman/listinfo/red5_osflash.org >> >> >> > > > _______________________________________________ > Red5 mailing list > [email protected] > http://osflash.org/mailman/listinfo/red5_osflash.org > > > _______________________________________________ > Red5 mailing list > [email protected] > http://osflash.org/mailman/listinfo/red5_osflash.org > > _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
