Re: [Simpleweb-Support] FIX: Simple stops responding
Brought to you by:
niallg
|
From: Andrew M. <and...@ya...> - 2005-08-05 23:05:45
|
I wonder why the queue uses an array and not a linked list? Niall Gallagher wrote: >Hi Jorge, > >Apologies for contacting you directly. However, I >think I have found a solution, but I don't want to be >too hasty. What triggered this is when you said that >at least 35 threads had to be involved. > >So, I downloaded the simple-test.tar.gz and resized >the ProcessQueue, this caused a deadlock with the very >same test case. So if you could be so kind as to check >to see if this works for you! In the file >ProcessQueue.java change the following line. > >this.ready = new ObjectQueue(size); > >to > >this.ready = new ObjectQueue(100); > >Making sure that you dont resize beyond 100. I think >the problem is that the ProcessQueue.resize does not >resize the ObjectQueue. This seems to work for my >tests? > >Niall > > > >--- Jorge CAMPOS <Jor...@ge...> wrote: > > > >>Hi everybody! >> >>From our tests with our application, it seems that >>Simple hangs only when >>using at least 35 threads in parallel (we're testing >>in a 4Way Xeon with HT >>running SuSE SLES 9.0 and JDK 1.5.0_04). From the >>thread dump and some >>printlns in the code it seems that one thread >>(dequeuer) blocks because >>there are no more requests to be processed. After >>that everything starts >>piling up (all the dequeuers wait for the first one >>and the enqueuers too). >>I know it sound a bit weird, but it could be related >>to the locking queue >>implementation. >> >>I've tried to reproduce the problem using the demo >>server and I didn't >>succeed. I guess the context is different (to >>simulate some load I've put >>one sleep and some printlns). This made me look >>again at our thread dump... >>and I can't see anything related to our application >>(it seems that Simple >>blocks within its code). >> >>One question Andrew: what are the specs of your >>machine? >> >>I'm asking this, because I've seen some locking >>problems in applications >>running with HyperThreading ON. >> >>We will test the application running with >>HyperThreading off and in another >>machine to see if we can reproduce the problem. >> >>All your support is greatly appreciated. >> >>Ah, one more thing. Since in our thread dump it >>seems all the threads are >>still alive, I don't think this particular case >>relates to a out of memory >>exception (also there are no exceptions in the logs) >> >> >>Jorge >> >>-----Original Message----- >>From: sim...@li... >> >> >> >[mailto:sim...@li...]On > > >>Behalf Of Niall >>Gallagher >>Sent: Wednesday, August 03, 2005 10:21 AM >>To: sim...@li... >>Subject: Re: [Simpleweb-Support] FIX: Simple stops >>responding >> >> >>Hi, >> >>I have taken note of the last two comments with >>regard >>to the server freezing! In response to the queue >>implementation, I think that the implementation of >>the >>Scheduler, ObjectQueue, and ProcessQueue involved in >>dispatching requests is fine. There are no problems >>here. >> >>However, the simple.http.connect implementation may >>be >>at fault, and I have no doubt whatsoever that the >>java.lang.OutOfMemory error will cause the server to >>stop responding under very heavy load. >> >>I have uploaded my test framework for anyone wishing >>to use it to see if it will freeze their server. If >>it does then great! let me know what happened. >>However, I have put through well over a 100 million >>requests using my test framework today alone and, >>with >>the catch(Throwable) amendments there is no >>deadlock, >>not even a lost thread. >> >>The test framework can be downloaded at >>http://simpleweb.sf.net/simple-test.tar.gz. >> >>So, in conclusion, the application is thread safe >>and >>working properly with catch(Throwable) amendments. >>However, the TCP related issues have not been >>thought >>out carefully! And I believe the simple.http.connect >>package needs to be reworked! I will release all the >>bug fixes as soon as I am convinced everything is >>working. >> >>Thanks for the bug reports, if anyone thinks the >>freeze is related to somthing else please let me >>know >>so that I can explore it! >> >>Niall >> >> >>Niall Gallagher >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam >>protection around >>http://mail.yahoo.com >> >> >> >> >> >------------------------------------------------------- > > >>SF.Net email is sponsored by: Discover Easy Linux >>Migration Strategies >>from IBM. Find simple to follow Roadmaps, >>straightforward articles, >>informative Webcasts and more! Get everything you >>need to get up to >>speed, fast. >> >> >> >http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > >>_______________________________________________ >>Simpleweb-Support mailing list >>Sim...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > >> >> >> >> >------------------------------------------------------- > > >>SF.Net email is Sponsored by the Better Software >>Conference & EXPO >>September 19-22, 2005 * San Francisco, CA * >>Development Lifecycle Practices >>Agile & Plan-Driven Development * Managing Projects >>& Teams * Testing & QA >>Security * Process Improvement & Measurement * >>http://www.sqe.com/bsce5sf >>_______________________________________________ >>Simpleweb-Support mailing list >>Sim...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > >Niall Gallagher > > > >____________________________________________________ >Start your day with Yahoo! - make it your home page >http://www.yahoo.com/r/hs > > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >Simpleweb-Support mailing list >Sim...@li... >https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > |