Re: FW: [Simpleweb-Support] Simple stops responding
Brought to you by:
niallg
From: Niall G. <gal...@ya...> - 2005-07-30 19:35:19
|
Hi Guys, I think I have figured out why there is a freeze under heavy load. Its due to an uncaught java.lang.OutOfMemoryError, which is thrown out of the Processor.run method, this stops the thread running. To fix this go into the simple.http.Processor object and replace all lines that match catch(Exception with catch(Throwable This will solve your problem! Also it might be a good idea to replace the same within the simple.util.process.Daemon object. I am continuing to do the tests, but this fix seems to be at the root of the problem. Niall --- Jorge CAMPOS <Jor...@ge...> wrote: > Hi Niall! > > I'm attaching the console output (removed a lot of > lines before the end to > shrink the file size, I've sent you the zip file to > Yahoo) of our server > with (at the end) a thread dump... After the thread > dump you will find that > there is another request (just to see where is it > hanging) > > I've attached the classes with the println I've > added, and the > Thread.setName (BTW, can you name the threads? it > helps a lot when debugging > and profiling) > > It seems that there are no more dequeuers in the > SchedulerQueue.java and > then the lock.notify() is not executed (I'll check > this today). > > All the threads are in wait(), but they don't seem > to be deadlocked. I > failed to see our code in the waiting threads, so it > seems they are not > waiting for some request to be finished (at least it > doesn't seems so to > me). > > I hope this helps you in your research and thansk > again for your support. > > Jorge > > > -----Original Message----- > From: sim...@li... > [mailto:sim...@li...]On > Behalf Of Niall > Gallagher > Sent: Friday, July 29, 2005 5:21 AM > To: sim...@li... > Subject: Re: [Simpleweb-Support] Simple stops > responding > > > Hi Michael, > > Thank you for this feedback! I am going to be > testing > this over the next few days to track down this > problem, which is obviously pretty severe...I will > hopefully have a solution pretty soon! At which time > I > will upload the updated version! > > Regards, > Niall > > --- "Michael \"Luni\" Libes" > <lun...@ya...> wrote: > > > Niall, > > > > I'm successfully tested Simple with web stress > > tools. However, > > I've found a case that does match what others are > > seeing, and > > this bug can be triggered with a handful of > > requests. > > > > I have not yet tracked down exactly what is going > > on, but the > > server "hangs" whenver there are some connections > in > > the > > CLOSE_WAIT state. We were able to trigger this > via > > a connection > > initiated by a J2ME handset when the HTTP > connection > > was not > > properly closed, and similarly with a J2SE > > monitoring tool using > > java.net.URL. > > > > For those not aware, CLOSE_WAIT is a TCP state > where > > the server > > has closed the connection but the client has not > > acknolwedged > > and closed it's side of the connection. (See > > > http://www.mail-archive.com/com...@ja.../msg043 > 38.html > > and > > > http://www.tek-tips.com/viewthread.cfm?qid=669906). > > > > Is there any way within Java to detect when a > socket > > is in this > > state? If so, is there any way to get the socket > to > > get in a > > TIME_WAIT or CLOSED state? > > > > Luni > > > > > > --- Niall Gallagher <gal...@ya...> > > wrote: > > > > > Hi, > > > > > > This is interesting, I would like to know what > > > conclusions you come to! However, I have tested > > simple > > > with really enormous loads, for a long period of > > time, > > > the only problem I could find was with the log > > files. > > > They were too big and the system ran out of disk > > > space! Still requests were being processed fine! > > > > > > Just downloaded the simple-demo-1.0.tar.gz from > > the > > > site with no problems. I will send it to you > > directly. > > > > > > Niall > > > > > > --- Jorge CAMPOS <Jor...@ge...> > wrote: > > > > > > > Hi Niall! > > > > > > > > First of all thank you for your support. > > > > > > > > The problem we have is not an HTTP problem. In > a > > > > network environment is > > > > common that connections get broken and I agree > > that > > > > it is probably logical > > > > to close the connection. > > > > > > > > But our issue is that after stressing Simple > > with > > > > JMeter, the Simple stops > > > > responding. I mean, the ServerSocket continues > > to > > > > accept connections, but > > > > the requests are not treated. The rest of the > > > > application continues to run > > > > normally. > > > > > > > > It seems like there are no more resources to > > handle > > > > the incoming requests > > > > (all previous requests were finished, so the > > pool > > > > should be able to process > > > > more, but nothing happens). > > > > > > > > Henry thought it could be related to the > > > > Poller.close(), thinking perhaps a > > > > thread was removed from the pool and none was > > > > created to replace it. > > > > > > > > I'm trying to download your demo server to > > reproduce > > > > the problem, but I > > > > can't download it from your download section > > > > (timeout, broken file, etc). > > > > Can you put the files in the files section of > > > > sourceforge (I guess at least > > > > one mirror should work for me). > > > > > > > > Thank you very much for your support. > > > > > > > > Jorge > > > > > > > > > > > > -----Original Message----- > > > > From: > > sim...@li... > > > > > > > > > > [mailto:sim...@li...]On > > > > Behalf Of Niall > > > > Gallagher > > > > Sent: Tuesday, July 26, 2005 3:24 PM > > > > To: sim...@li... > > > > Subject: RE: [Simpleweb-Support] Problem when > > stress > > > > testing an > > > > application using SimpleWeb > > > > > === message truncated === Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |