Re: [Simpleweb-Support] Asynchronous Http Service Complete Example
Brought to you by:
niallg
From: rayhan <sav...@gm...> - 2009-06-09 10:55:58
|
Thx for your reply. I've attached ThreadDumper output and ApplicationMonitor output for you analysis. Regarding netstat, what information you would like to know? For the start, here is general netstat you may want to know: 2584 #> netstat -an | grep 28102 | grep ESTABLISH | wc -l 2043 2591 #> netstat -an | grep 28102 | grep CLOSE_WAIT | wc -l 1288 2592 #> netstat -an | grep 28102 | grep TIME_WAIT | wc -l 0 2589 #> lsof -p 26736 | grep ESTABLISHED | wc -l 1022 28102 is my application listening port, and 26736 is my PID. I'm looking forward for your assistance. thx :) On Tue, Jun 9, 2009 at 3:47 PM, Niall Gallagher<gal...@ya...> wrote: > > Hi, > > I would need a thread dump and output from netstat to determine what is wrong with your application. With regard to stress tests I have tested Simple with at least 100 million requests using ApacheBench. Also I have tested with HttpClient, Faban and my own stress tester, again the tests involved millions of requests without any issues. Take a look at the following tools which can help grab the informataion. > > For thread dumps: > http://svn.sourceforge.net/viewvc/simpleweb/trunk/src/test/java/org/simpleframework/http/core/ThreadDumper.java?revision=1448&view=markup > > For general stats: > http://svn.sourceforge.net/viewvc/simpleweb/trunk/src/location/java/org/simpleframework/location/ApplicationMonitor.java?revision=1448&view=markup > > Regards, > Niall > > > > > --- On Tue, 6/9/09, rayhan <sav...@gm...> wrote: > >> From: rayhan <sav...@gm...> >> Subject: Re: [Simpleweb-Support] Asynchronous Http Service Complete Example >> To: "Simple support and user issues" <sim...@li...> >> Date: Tuesday, June 9, 2009, 12:51 AM >> Thanx for your response. I already >> implement the asynchronous model of >> HTTP response and it works magic :) >> >> However, recently did load/stress test my application that >> uses >> simpleframework http listener. I'm using httperf load >> tester. I set >> load test traffic with 500 tps, and the application >> responded well >> initially. >> >> But after 30 minutes test, the application cannot receive >> more >> traffic. I try to hit one traffic manually using telnet, >> it's >> connected but not responding. I try to count established >> connection / >> file handlers using this command: >> >> lsof -p 26120 | wc -l >> 1663 >> >> There's 1663 establish connection. Something's wrong here >> .. >> >> I'm using both simple 4.1.11 and 4.1.10. >> >> Then I search mailinglist archive, and found similar >> problem regarding >> file handler. I try to switch back to 4.1.9, and it works >> well >> initially, for an hour collapse again. >> >> Any advice? Maybe there is something wrong in my >> application? FYI, >> always closed every response object per request >> >> On Mon, Jun 8, 2009 at 3:41 PM, <Nia...@ub...> >> wrote: >> > Hi, >> > >> > Yes its very simple. There are no restrictions on how >> to process >> > requests asynchronously. For example try this. >> > >> > public void handle(final Request req, final Response >> resp) { >> > new Thread(new Runnable() { >> > public void run() { >> > try { >> > PrintStream out = >> resp.getPrintStream(); >> > resp.set("Content-Type", >> "text/html"); >> > out.println("Hello World!); >> > out.close(); // commits and sends >> response >> > }catch(Exception e) { >> > e.printStackTrace(); >> > } >> > } >> > }).start(); >> > } >> > >> > For simple the closure of the Response object or the >> OutputStream is >> > what completes the response. So you can pass the >> response object to an >> > asynchronous thread without any issues. Hope this >> helps. >> > >> > Niall >> > >> > -----Original Message----- >> > From: rayhan [mailto:sav...@gm...] >> > Sent: 08 June 2009 05:54 >> > To: sim...@li... >> > Subject: [Simpleweb-Support] Asynchronous Http Service >> Complete Example >> > >> > Hello All :) >> > >> > I recently joined this mailinglist, and I curious to >> know how to >> > correctly asynchronous service using simpleframework. >> I already the saw >> > the tutorial in >> > http://www.simpleframework.org/doc/tutorial/tutorial.php#async, >> but I >> > thinks it's not complete. Does anyone has complete >> working example on >> > how to use it? I need asynchronous services badly :) >> > >> > Thx for your help >> > >> > -- >> > -- # SC -# >> > >> > >> ------------------------------------------------------------------------ >> > ------ >> > OpenSolaris 2009.06 is a cutting edge operating system >> for enterprises >> > looking to deploy the next generation of Solaris that >> includes the >> > latest innovations from Sun and the OpenSource >> community. Download a >> > copy and enjoy capabilities such as Networking, >> Storage and >> > Virtualization. >> > Go to: http://p.sf.net/sfu/opensolaris-get >> > _______________________________________________ >> > Simpleweb-Support mailing list >> > Sim...@li... >> > https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > Visit our website at http://www.ubs.com >> > >> > This message contains confidential information and is >> intended only >> > for the individual named. If you are not the named >> addressee you >> > should not disseminate, distribute or copy this >> e-mail. Please >> > notify the sender immediately by e-mail if you have >> received this >> > e-mail by mistake and delete this e-mail from your >> system. >> > >> > E-mails are not encrypted and cannot be guaranteed to >> be secure or >> > error-free as information could be intercepted, >> corrupted, lost, >> > destroyed, arrive late or incomplete, or contain >> viruses. The sender >> > therefore does not accept liability for any errors or >> omissions in the >> > contents of this message which arise as a result of >> e-mail transmission. >> > If verification is required please request a hard-copy >> version. This >> > message is provided for informational purposes and >> should not be >> > construed as a solicitation or offer to buy or sell >> any securities >> > or related financial instruments. >> > >> > UBS Limited is a company registered in England & >> Wales under company >> > number 2035362, whose registered office is at 1 >> Finsbury Avenue, >> > London, EC2M 2PP, United Kingdom. >> > >> > UBS AG (London Branch) is registered as a branch of a >> foreign company >> > under number BR004507, whose registered office is at >> > 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. >> > >> > UBS Clearing and Execution Services Limited is a >> company registered >> > in England & Wales under company number 03123037, >> whose registered >> > office is at 1 Finsbury Avenue, London, EC2M 2PP, >> United Kingdom. >> > >> > UBS reserves the right to retain all messages. >> Messages are protected >> > and accessed only in legally justified cases. >> > >> > >> ------------------------------------------------------------------------------ >> > OpenSolaris 2009.06 is a cutting edge operating system >> for enterprises >> > looking to deploy the next generation of Solaris that >> includes the latest >> > innovations from Sun and the OpenSource community. >> Download a copy and >> > enjoy capabilities such as Networking, Storage and >> Virtualization. >> > Go to: http://p.sf.net/sfu/opensolaris-get >> > _______________________________________________ >> > Simpleweb-Support mailing list >> > Sim...@li... >> > https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > >> >> >> >> -- >> -- # SC -# >> >> ------------------------------------------------------------------------------ >> Crystal Reports - New Free Runtime and 30 Day Trial >> Check out the new simplified licensing option that enables >> unlimited >> royalty-free distribution of the report engine for >> externally facing >> server and web deployment. >> http://p.sf.net/sfu/businessobjects >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- -- # SC -# |