simpleweb-support Mailing List for Simple (Page 11)
Brought to you by:
niallg
You can subscribe to this list here.
2004 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(14) |
May
(22) |
Jun
(15) |
Jul
(9) |
Aug
(2) |
Sep
(7) |
Oct
(4) |
Nov
(2) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(7) |
Feb
(16) |
Mar
(17) |
Apr
|
May
(12) |
Jun
(4) |
Jul
(22) |
Aug
(50) |
Sep
(8) |
Oct
(23) |
Nov
(9) |
Dec
(50) |
2006 |
Jan
(6) |
Feb
(7) |
Mar
(8) |
Apr
(3) |
May
(13) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(7) |
2007 |
Jan
(11) |
Feb
(3) |
Mar
(17) |
Apr
(21) |
May
(9) |
Jun
(4) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(14) |
Dec
(3) |
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(4) |
Aug
(4) |
Sep
(15) |
Oct
(9) |
Nov
(6) |
Dec
(2) |
2009 |
Jan
(29) |
Feb
(2) |
Mar
(8) |
Apr
(14) |
May
(4) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
|
Feb
(2) |
Mar
(61) |
Apr
(9) |
May
(10) |
Jun
(9) |
Jul
(10) |
Aug
(7) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(4) |
Oct
|
Nov
(6) |
Dec
(9) |
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(5) |
2013 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(12) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2014 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
|
May
|
Jun
(20) |
Jul
(12) |
Aug
(4) |
Sep
(3) |
Oct
(5) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <nia...@rb...> - 2010-03-12 16:07:33
|
Hi, Whats happening here is that the request is queued for an asynchronous response, so when you write your data it is passed to a ByteBuffer queue which is asynchronously flushed by a SocketFlusher if it can not be written straight away, this allows the servicing thread to return while the kernel waits for an I/O event do occur. This means that if during delivery there is an exception you will not see it as its smothered by the internal reactor (which is using a different thread pool). One thing you can do is to commit() and flush() straight away, this guarantees that the client will get the HTTP header before you start sending the response. Here I am assuming your clients will not close the connection in mid response? If this is the case your initial flush will allow you to determine if the client is closing the connection. If this is not enough, you can do the following to get the SocketChannel and detect if its closed. public class SocketSnoopServer implements Server { private final Server realServer ; public SocketSnoopServer (Server realServer ){ this.realServer = realServer ; } public void process(Socket socket)throws IOException{ Map atts = socket.getAttributes(); SocketChannel channel = socket.getChannel(); atts.put("mySocket", channel); realServer.process(socket); } public void stop() throws Exception{ realServer.stop(); } } To create a new server go Container container = new MyContainer(); Processor processor = new ContainerProcessor(container, new FileAllocator(), 5); Server server = new ProcessorServer(processor, 5); Connection connection = new SocketConnection(server); connection.connect(new InetSocketAddress(80)); Then when you go request.getAttribute("mySocket") you will get the SocketChannel. You can then check socket.isClosed() etc.. Hope this helps Niall ________________________________ From: Andrew Clarke [mailto:cla...@gm...] Sent: 12 March 2010 15:33 To: sim...@li... Subject: [Simpleweb-Support] Closed client socket not causing an exception to be thrown I am using simpleframework for a restful API which responds to ~10 requests per second. API clients will give up on a request if it takes more than x milliseconds and I need to be able to detect this within the Container. I have exception handling in Container.handle method but it appears that no exception is thrown if i close a client socket before the response has been sent in fact when I send the response to the client : httpResponse.getPrintStream().print(responseStr); httpResponse.getPrintStream().flush(); I seem to be able to flush the print stream and no exception is thrown even though I have already closed the client socket. Any ideas what may be happening here? Thanks Andrew *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: Andrew C. <cla...@gm...> - 2010-03-12 15:33:03
|
I am using simpleframework for a restful API which responds to ~10 requests per second. API clients will give up on a request if it takes more than x milliseconds and I need to be able to detect this within the Container. I have exception handling in Container.handle method but it appears that no exception is thrown if i close a client socket before the response has been sent in fact when I send the response to the client : httpResponse.getPrintStream().print(responseStr); httpResponse.getPrintStream().flush(); I seem to be able to flush the print stream and no exception is thrown even though I have already closed the client socket. Any ideas what may be happening here? Thanks Andrew |
From: Ian C. <ian...@gm...> - 2010-03-12 12:32:12
|
On Fri, Mar 12, 2010 at 6:27 AM, <nia...@rb...> wrote: > Hi, > > >From the stack trace here http://gist.github.com/330258 it looks as if you are on a very old version of Simple. I renamed the threads quite some time ago. Are you using 4.1.18? I was using 4.1.1 actually, but now I've upgraded it. > At any rate, if you upgrate yo 4.1.19 I would really appreciate you letting me know how things go. Regardless of whether it works and fixes the issue or fails again with CLOSE_WAIT. I will endeavour to fix this issue as soon as possible. Ok, I have upgraded and redeployed, I'll let you know if it happens again. > Just out of interest, what OS and VM are you using? Sure: [ahunter@toolbox3 ~]$ java -version java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode) [ahunter@toolbox3 ~]$ uname -a Linux [...snip...] 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:38:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux Thanks for being so responsive! Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: <nia...@rb...> - 2010-03-12 12:27:46
|
Hi, >From the stack trace here http://gist.github.com/330258 it looks as if you are on a very old version of Simple. I renamed the threads quite some time ago. Are you using 4.1.18? At any rate, if you upgrate yo 4.1.19 I would really appreciate you letting me know how things go. Regardless of whether it works and fixes the issue or fails again with CLOSE_WAIT. I will endeavour to fix this issue as soon as possible. Just out of interest, what OS and VM are you using? Thanks for the feedback, Niall -----Original Message----- From: Ian Clarke [mailto:ian...@gm...] Sent: 12 March 2010 12:07 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Niall, Bad news I'm afraid: Despite wrapping my container in a SynchronousContainer as you suggested, my linux box just ran out of file handles again due to the CLOSE_WAIT issue. I did a kill -3 and you can see the thread dump here (with duplicates removed): http://gist.github.com/330258 Do you have any ideas? Ian. On Thu, Mar 11, 2010 at 3:51 AM, <nia...@rb...> wrote: > Hi, > > Firstly let me explain what CLOSE_WAIT actually means. CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection. So you are not closing your end of the socket. > > The servicing model employed by Simple is very different from that used by Servlets. With Servlets the container handles request completion by flushing an closing the request for you. However, with Simple you MUST close the connection yourself. Why? Well you must close the connection yourself because if the container closed it then you could not perform asynchronous processing. For most people asynchronous processing is an advanced feature they do not need. If you are such a person then your server REALLY SHOULD do something like so. > > public class SynchronousContainer implements Container { > private final Container realContainer; > public SynchronousContainer(Container realContainer){ > this.realContainer = realContainer; > } > public void handle(Request request, Response response){ > try{ > realContainer.handle(request,response); > }finally{ > try{ > response.close(); > }catch(Exception e){ > // ignore... > } > } > } > } > > With the above container wrapper you are guaranteed that all requests are close regardless of whether exceptions are thrown or whether you forget to close it yourself. This is how a Servlet Container works. > > Niall > > > Niall Gallagher > RBS Global Banking & Markets > Office: +44 2070851454 > > -----Original Message----- > From: Ian Clarke [mailto:ian...@gm...] > Sent: 10 March 2010 22:44 > To: sim...@li... > Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). > > Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. > > Can anyone suggest what might be causing this? > > Ian. > > -- > Ian Clarke > CEO, SenseArray > Email: ia...@se... > Ph: +1 512 422 3588 > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ********************************************************************** > ************* The Royal Bank of Scotland plc. Registered in Scotland > No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the De > Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and > is registered in the Commercial Register under number 33002587. > Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. > The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are > authorised to act as agent for each other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept > responsibility for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward transmission, opening or use of this message and any > attachments will not adversely affect its systems or data. No > responsibility is accepted by the RBS group in this regard and the > recipient should carry out such virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > ********************************************************************** > ************* > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Ian C. <ian...@gm...> - 2010-03-12 12:25:20
|
Doh, it is updated, never mind. Ian. On Fri, Mar 12, 2010 at 6:09 AM, Ian Clarke <ian...@gm...> wrote: > Would it be possible to update the maven repository? > > Ian. > > On Fri, Mar 12, 2010 at 5:02 AM, <nia...@rb...> wrote: >> Hi, >> >> I have released 4.1.19, this contains a fix for the SocketWriter so that the close will not throw an exception when invoking shutdownOutput(). I should be downloadable at http://www.simpleframework.org >> >> Niall >> >> -----Original Message----- >> From: saviourcat [mailto:sav...@gm...] >> Sent: 11 March 2010 16:00 >> To: Simple support and user issues >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> Great! Thanks Niall for your persistence support all the time. I'll wait for the release >> >> -- >> Sent using Telkomsel network >> Twitter: @md_ray >> Email/IM: sav...@gm... and md...@ya... >> >> -----Original Message----- >> From: <nia...@rb...> >> Date: Thu, 11 Mar 2010 14:56:17 >> To: <sim...@li...> >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I will make sure a try/catch wraps the shutdownOutput method and build a new release. >> >> Thanks, >> Niall >> >> -----Original Message----- >> From: Thierry Boileau [mailto:thb...@gm...] >> Sent: 11 March 2010 14:37 >> To: Simple support and user issues >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> Hello, >> >> we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. >> However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. >> >> Best regards, >> Thierry Boileau >> >>> What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. >>> Thanks for the feedback. >>> Niall >>> >>> -----Original Message----- >>> From: Christophe Roudet [mailto:cr...@ac...] >>> Sent: 11 March 2010 14:04 >>> To: sim...@li... >>> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >>> >>> I had the same thing, I have patched >>> org.simpleframework.transport.SocketWriter.close(). >>> >>> I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: >>> >>> public synchronized void close() throws IOException { >>> if(!closed) { closed = true; >>> builder.close(); >>> try { >>> channel.socket().shutdownOutput(); // send FIN ACK >>> } catch (IOException ioex) { >>> } >>> channel.close(); >>> } >>> } >>> >>> Christophe >>> >>> On 3/10/2010 8:26 PM, saviourcat wrote: >>>> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >>>> >>>> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >>>> >>>> -- >>>> Sent using Telkomsel network >>>> Twitter: @md_ray >>>> Email/IM: sav...@gm... and md...@ya... >>>> >>>> -----Original Message----- >>>> From: Ian Clarke<ian...@gm...> >>>> Date: Wed, 10 Mar 2010 16:43:37 >>>> To:<sim...@li...> >>>> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >>>> >>>> I'm using SimpleWeb to power a JSON REST API, which gets hit with >>>> around 4 requests per second (mainly POST requests). >>>> >>>> Occasionally I'm finding that my Linux server runs out of file >>>> descriptors, and an lsof reveals that its because a bunch of >>>> connections are stuck in CLOSE_WAIT. >>>> >>>> Can anyone suggest what might be causing this? >>>> >>>> Ian. >>>> >>>> >>> >>> >>> -- >>> Christophe Roudet >>> >>> >>> ---------------------------------------------------------------------- >>> -------- Download Intel® Parallel Studio Eval Try the new >>>software tools for yourself. Speed compiling, find bugs proactively, >>>and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>>_______________________________________________ >>> Simpleweb-Support mailing list >>> Sim...@li... >>> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >>> >>> ********************************************************************** >>> ************* The Royal Bank of Scotland plc. Registered in Scotland >>> No 90312. >>> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. >>> Authorised and regulated by the Financial Services Authority. The >>> Royal Bank of Scotland N.V. is authorised and regulated by the De >>> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and >>> is registered in the Commercial Register under number 33002587. >>> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. >>> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are >>> authorised to act as agent for each other in certain jurisdictions. >>> >>> This e-mail message is confidential and for use by the addressee only. >>> If the message is received by anyone other than the addressee, please >>> return the message to the sender by replying to it and then delete the >>> message from your computer. Internet e-mails are not necessarily >>> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland >>> N.V. including its affiliates ("RBS group") does not accept >>> responsibility for changes made to this message after it was sent. >>> >>> Whilst all reasonable care has been taken to avoid the transmission of >>> viruses, it is the responsibility of the recipient to ensure that the >>> onward transmission, opening or use of this message and any >>> attachments will not adversely affect its systems or data. No >>> responsibility is accepted by the RBS group in this regard and the >>> recipient should carry out such virus and other checks as it considers appropriate. >>> >>> Visit our website at www.rbs.com >>> >>> ********************************************************************** >>> ************* >>> >>> >>> ---------------------------------------------------------------------- >>> -------- Download Intel® Parallel Studio Eval Try the new >>>software tools for yourself. Speed compiling, find bugs proactively, >>>and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>>_______________________________________________ >>> Simpleweb-Support mailing list >>> Sim...@li... >>> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >>> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > > > -- > Ian Clarke > CEO, SenseArray > Email: ia...@se... > Ph: +1 512 422 3588 > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: <nia...@rb...> - 2010-03-12 12:25:19
|
It should be available via Maven. http://mirrors.ibiblio.org/pub/mirrors/maven2/org/simpleframework/simple/4.1.19/ Niall -----Original Message----- From: Ian Clarke [mailto:ian...@gm...] Sent: 12 March 2010 12:10 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Would it be possible to update the maven repository? Ian. On Fri, Mar 12, 2010 at 5:02 AM, <nia...@rb...> wrote: > Hi, > > I have released 4.1.19, this contains a fix for the SocketWriter so > that the close will not throw an exception when invoking > shutdownOutput(). I should be downloadable at > http://www.simpleframework.org > > Niall > > -----Original Message----- > From: saviourcat [mailto:sav...@gm...] > Sent: 11 March 2010 16:00 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > Great! Thanks Niall for your persistence support all the time. I'll > wait for the release > > -- > Sent using Telkomsel network > Twitter: @md_ray > Email/IM: sav...@gm... and md...@ya... > > -----Original Message----- > From: <nia...@rb...> > Date: Thu, 11 Mar 2010 14:56:17 > To: <sim...@li...> > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I will make sure a try/catch wraps the shutdownOutput method and build a new release. > > Thanks, > Niall > > -----Original Message----- > From: Thierry Boileau [mailto:thb...@gm...] > Sent: 11 March 2010 14:37 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > Hello, > > we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. > However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. > > Best regards, > Thierry Boileau > >> What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. >> Thanks for the feedback. >> Niall >> >> -----Original Message----- >> From: Christophe Roudet [mailto:cr...@ac...] >> Sent: 11 March 2010 14:04 >> To: sim...@li... >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I had the same thing, I have patched >> org.simpleframework.transport.SocketWriter.close(). >> >> I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: >> >> public synchronized void close() throws IOException { >> if(!closed) { closed = true; >> builder.close(); >> try { >> channel.socket().shutdownOutput(); // send FIN ACK >> } catch (IOException ioex) { >> } >> channel.close(); >> } >> } >> >> Christophe >> >> On 3/10/2010 8:26 PM, saviourcat wrote: >>> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >>> >>> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >>> >>> -- >>> Sent using Telkomsel network >>> Twitter: @md_ray >>> Email/IM: sav...@gm... and md...@ya... >>> >>> -----Original Message----- >>> From: Ian Clarke<ian...@gm...> >>> Date: Wed, 10 Mar 2010 16:43:37 >>> To:<sim...@li...> >>> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >>> >>> I'm using SimpleWeb to power a JSON REST API, which gets hit with >>> around 4 requests per second (mainly POST requests). >>> >>> Occasionally I'm finding that my Linux server runs out of file >>> descriptors, and an lsof reveals that its because a bunch of >>> connections are stuck in CLOSE_WAIT. >>> >>> Can anyone suggest what might be causing this? >>> >>> Ian. >>> >>> >> >> >> -- >> Christophe Roudet >> >> >> >>---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >>software tools for yourself. Speed compiling, find bugs proactively, >>and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >>_______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> ********************************************************************* >> * >> ************* The Royal Bank of Scotland plc. Registered in Scotland >> No 90312. >> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. >> Authorised and regulated by the Financial Services Authority. The >> Royal Bank of Scotland N.V. is authorised and regulated by the De >> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, >> and is registered in the Commercial Register under number 33002587. >> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. >> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc >> are authorised to act as agent for each other in certain jurisdictions. >> >> This e-mail message is confidential and for use by the addressee only. >> If the message is received by anyone other than the addressee, please >> return the message to the sender by replying to it and then delete >> the message from your computer. Internet e-mails are not necessarily >> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland >> N.V. including its affiliates ("RBS group") does not accept >> responsibility for changes made to this message after it was sent. >> >> Whilst all reasonable care has been taken to avoid the transmission >> of viruses, it is the responsibility of the recipient to ensure that >> the onward transmission, opening or use of this message and any >> attachments will not adversely affect its systems or data. No >> responsibility is accepted by the RBS group in this regard and the >> recipient should carry out such virus and other checks as it considers appropriate. >> >> Visit our website at www.rbs.com >> >> ********************************************************************* >> * >> ************* >> >> >> >>---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >>software tools for yourself. Speed compiling, find bugs proactively, >>and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >>_______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Ian C. <ian...@gm...> - 2010-03-12 12:10:11
|
Would it be possible to update the maven repository? Ian. On Fri, Mar 12, 2010 at 5:02 AM, <nia...@rb...> wrote: > Hi, > > I have released 4.1.19, this contains a fix for the SocketWriter so that the close will not throw an exception when invoking shutdownOutput(). I should be downloadable at http://www.simpleframework.org > > Niall > > -----Original Message----- > From: saviourcat [mailto:sav...@gm...] > Sent: 11 March 2010 16:00 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > Great! Thanks Niall for your persistence support all the time. I'll wait for the release > > -- > Sent using Telkomsel network > Twitter: @md_ray > Email/IM: sav...@gm... and md...@ya... > > -----Original Message----- > From: <nia...@rb...> > Date: Thu, 11 Mar 2010 14:56:17 > To: <sim...@li...> > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I will make sure a try/catch wraps the shutdownOutput method and build a new release. > > Thanks, > Niall > > -----Original Message----- > From: Thierry Boileau [mailto:thb...@gm...] > Sent: 11 March 2010 14:37 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > Hello, > > we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. > However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. > > Best regards, > Thierry Boileau > >> What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. >> Thanks for the feedback. >> Niall >> >> -----Original Message----- >> From: Christophe Roudet [mailto:cr...@ac...] >> Sent: 11 March 2010 14:04 >> To: sim...@li... >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I had the same thing, I have patched >> org.simpleframework.transport.SocketWriter.close(). >> >> I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: >> >> public synchronized void close() throws IOException { >> if(!closed) { closed = true; >> builder.close(); >> try { >> channel.socket().shutdownOutput(); // send FIN ACK >> } catch (IOException ioex) { >> } >> channel.close(); >> } >> } >> >> Christophe >> >> On 3/10/2010 8:26 PM, saviourcat wrote: >>> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >>> >>> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >>> >>> -- >>> Sent using Telkomsel network >>> Twitter: @md_ray >>> Email/IM: sav...@gm... and md...@ya... >>> >>> -----Original Message----- >>> From: Ian Clarke<ian...@gm...> >>> Date: Wed, 10 Mar 2010 16:43:37 >>> To:<sim...@li...> >>> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >>> >>> I'm using SimpleWeb to power a JSON REST API, which gets hit with >>> around 4 requests per second (mainly POST requests). >>> >>> Occasionally I'm finding that my Linux server runs out of file >>> descriptors, and an lsof reveals that its because a bunch of >>> connections are stuck in CLOSE_WAIT. >>> >>> Can anyone suggest what might be causing this? >>> >>> Ian. >>> >>> >> >> >> -- >> Christophe Roudet >> >> >> ---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >>software tools for yourself. Speed compiling, find bugs proactively, >>and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >>_______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> ********************************************************************** >> ************* The Royal Bank of Scotland plc. Registered in Scotland >> No 90312. >> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. >> Authorised and regulated by the Financial Services Authority. The >> Royal Bank of Scotland N.V. is authorised and regulated by the De >> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and >> is registered in the Commercial Register under number 33002587. >> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. >> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are >> authorised to act as agent for each other in certain jurisdictions. >> >> This e-mail message is confidential and for use by the addressee only. >> If the message is received by anyone other than the addressee, please >> return the message to the sender by replying to it and then delete the >> message from your computer. Internet e-mails are not necessarily >> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland >> N.V. including its affiliates ("RBS group") does not accept >> responsibility for changes made to this message after it was sent. >> >> Whilst all reasonable care has been taken to avoid the transmission of >> viruses, it is the responsibility of the recipient to ensure that the >> onward transmission, opening or use of this message and any >> attachments will not adversely affect its systems or data. No >> responsibility is accepted by the RBS group in this regard and the >> recipient should carry out such virus and other checks as it considers appropriate. >> >> Visit our website at www.rbs.com >> >> ********************************************************************** >> ************* >> >> >> ---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >>software tools for yourself. Speed compiling, find bugs proactively, >>and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >>_______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: Ian C. <ian...@gm...> - 2010-03-12 12:07:03
|
Niall, Bad news I'm afraid: Despite wrapping my container in a SynchronousContainer as you suggested, my linux box just ran out of file handles again due to the CLOSE_WAIT issue. I did a kill -3 and you can see the thread dump here (with duplicates removed): http://gist.github.com/330258 Do you have any ideas? Ian. On Thu, Mar 11, 2010 at 3:51 AM, <nia...@rb...> wrote: > Hi, > > Firstly let me explain what CLOSE_WAIT actually means. CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection. So you are not closing your end of the socket. > > The servicing model employed by Simple is very different from that used by Servlets. With Servlets the container handles request completion by flushing an closing the request for you. However, with Simple you MUST close the connection yourself. Why? Well you must close the connection yourself because if the container closed it then you could not perform asynchronous processing. For most people asynchronous processing is an advanced feature they do not need. If you are such a person then your server REALLY SHOULD do something like so. > > public class SynchronousContainer implements Container { > private final Container realContainer; > public SynchronousContainer(Container realContainer){ > this.realContainer = realContainer; > } > public void handle(Request request, Response response){ > try{ > realContainer.handle(request,response); > }finally{ > try{ > response.close(); > }catch(Exception e){ > // ignore... > } > } > } > } > > With the above container wrapper you are guaranteed that all requests are close regardless of whether exceptions are thrown or whether you forget to close it yourself. This is how a Servlet Container works. > > Niall > > > Niall Gallagher > RBS Global Banking & Markets > Office: +44 2070851454 > > -----Original Message----- > From: Ian Clarke [mailto:ian...@gm...] > Sent: 10 March 2010 22:44 > To: sim...@li... > Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). > > Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. > > Can anyone suggest what might be causing this? > > Ian. > > -- > Ian Clarke > CEO, SenseArray > Email: ia...@se... > Ph: +1 512 422 3588 > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the > De Nederlandsche Bank and has its seat at Amsterdam, the > Netherlands, and is registered in the Commercial Register under > number 33002587. Registered Office: Gustav Mahlerlaan 10, > Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and > The Royal Bank of Scotland plc are authorised to act as agent for each > other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept responsibility > for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the onward > transmission, opening or use of this message and any attachments will > not adversely affect its systems or data. No responsibility is accepted > by the RBS group in this regard and the recipient should carry out such > virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > *********************************************************************************** > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: <nia...@rb...> - 2010-03-12 11:02:59
|
Hi, I have released 4.1.19, this contains a fix for the SocketWriter so that the close will not throw an exception when invoking shutdownOutput(). I should be downloadable at http://www.simpleframework.org Niall -----Original Message----- From: saviourcat [mailto:sav...@gm...] Sent: 11 March 2010 16:00 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Great! Thanks Niall for your persistence support all the time. I'll wait for the release -- Sent using Telkomsel network Twitter: @md_ray Email/IM: sav...@gm... and md...@ya... -----Original Message----- From: <nia...@rb...> Date: Thu, 11 Mar 2010 14:56:17 To: <sim...@li...> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I will make sure a try/catch wraps the shutdownOutput method and build a new release. Thanks, Niall -----Original Message----- From: Thierry Boileau [mailto:thb...@gm...] Sent: 11 March 2010 14:37 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Hello, we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. Best regards, Thierry Boileau > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > > -----Original Message----- > From: Christophe Roudet [mailto:cr...@ac...] > Sent: 11 March 2010 14:04 > To: sim...@li... > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I had the same thing, I have patched > org.simpleframework.transport.SocketWriter.close(). > > I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: > > public synchronized void close() throws IOException { > if(!closed) { closed = true; > builder.close(); > try { > channel.socket().shutdownOutput(); // send FIN ACK > } catch (IOException ioex) { > } > channel.close(); > } > } > > Christophe > > On 3/10/2010 8:26 PM, saviourcat wrote: >> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >> >> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >> >> -- >> Sent using Telkomsel network >> Twitter: @md_ray >> Email/IM: sav...@gm... and md...@ya... >> >> -----Original Message----- >> From: Ian Clarke<ian...@gm...> >> Date: Wed, 10 Mar 2010 16:43:37 >> To:<sim...@li...> >> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I'm using SimpleWeb to power a JSON REST API, which gets hit with >> around 4 requests per second (mainly POST requests). >> >> Occasionally I'm finding that my Linux server runs out of file >> descriptors, and an lsof reveals that its because a bunch of >> connections are stuck in CLOSE_WAIT. >> >> Can anyone suggest what might be causing this? >> >> Ian. >> >> > > > -- > Christophe Roudet > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new >software tools for yourself. Speed compiling, find bugs proactively, >and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ********************************************************************** > ************* The Royal Bank of Scotland plc. Registered in Scotland > No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the De > Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and > is registered in the Commercial Register under number 33002587. > Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. > The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are > authorised to act as agent for each other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept > responsibility for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward transmission, opening or use of this message and any > attachments will not adversely affect its systems or data. No > responsibility is accepted by the RBS group in this regard and the > recipient should carry out such virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > ********************************************************************** > ************* > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new >software tools for yourself. Speed compiling, find bugs proactively, >and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: saviourcat <sav...@gm...> - 2010-03-11 15:58:59
|
Great! Thanks Niall for your persistence support all the time. I'll wait for the release -- Sent using Telkomsel network Twitter: @md_ray Email/IM: sav...@gm... and md...@ya... -----Original Message----- From: <nia...@rb...> Date: Thu, 11 Mar 2010 14:56:17 To: <sim...@li...> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I will make sure a try/catch wraps the shutdownOutput method and build a new release. Thanks, Niall -----Original Message----- From: Thierry Boileau [mailto:thb...@gm...] Sent: 11 March 2010 14:37 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Hello, we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. Best regards, Thierry Boileau > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > > -----Original Message----- > From: Christophe Roudet [mailto:cr...@ac...] > Sent: 11 March 2010 14:04 > To: sim...@li... > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I had the same thing, I have patched > org.simpleframework.transport.SocketWriter.close(). > > I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: > > public synchronized void close() throws IOException { > if(!closed) { closed = true; > builder.close(); > try { > channel.socket().shutdownOutput(); // send FIN ACK > } catch (IOException ioex) { > } > channel.close(); > } > } > > Christophe > > On 3/10/2010 8:26 PM, saviourcat wrote: >> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >> >> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >> >> -- >> Sent using Telkomsel network >> Twitter: @md_ray >> Email/IM: sav...@gm... and md...@ya... >> >> -----Original Message----- >> From: Ian Clarke<ian...@gm...> >> Date: Wed, 10 Mar 2010 16:43:37 >> To:<sim...@li...> >> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I'm using SimpleWeb to power a JSON REST API, which gets hit with >> around 4 requests per second (mainly POST requests). >> >> Occasionally I'm finding that my Linux server runs out of file >> descriptors, and an lsof reveals that its because a bunch of >> connections are stuck in CLOSE_WAIT. >> >> Can anyone suggest what might be causing this? >> >> Ian. >> >> > > > -- > Christophe Roudet > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ********************************************************************** > ************* The Royal Bank of Scotland plc. Registered in Scotland > No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the De > Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and > is registered in the Commercial Register under number 33002587. > Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. > The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are > authorised to act as agent for each other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept > responsibility for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward transmission, opening or use of this message and any > attachments will not adversely affect its systems or data. No > responsibility is accepted by the RBS group in this regard and the > recipient should carry out such virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > ********************************************************************** > ************* > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev >_______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Thierry B. <thb...@gm...> - 2010-03-11 15:01:09
|
cool! :) Best regards, Thierry Boileau On Thu, Mar 11, 2010 at 3:56 PM, <nia...@rb...> wrote: > I will make sure a try/catch wraps the shutdownOutput method and build a new release. > > Thanks, > Niall > > -----Original Message----- > From: Thierry Boileau [mailto:thb...@gm...] > Sent: 11 March 2010 14:37 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > Hello, > > we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. > However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. > > Best regards, > Thierry Boileau > >> What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. >> Thanks for the feedback. >> Niall >> >> -----Original Message----- >> From: Christophe Roudet [mailto:cr...@ac...] >> Sent: 11 March 2010 14:04 >> To: sim...@li... >> Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I had the same thing, I have patched >> org.simpleframework.transport.SocketWriter.close(). >> >> I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: >> >> public synchronized void close() throws IOException { >> if(!closed) { closed = true; >> builder.close(); >> try { >> channel.socket().shutdownOutput(); // send FIN ACK >> } catch (IOException ioex) { >> } >> channel.close(); >> } >> } >> >> Christophe >> >> On 3/10/2010 8:26 PM, saviourcat wrote: >>> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >>> >>> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >>> >>> -- >>> Sent using Telkomsel network >>> Twitter: @md_ray >>> Email/IM: sav...@gm... and md...@ya... >>> >>> -----Original Message----- >>> From: Ian Clarke<ian...@gm...> >>> Date: Wed, 10 Mar 2010 16:43:37 >>> To:<sim...@li...> >>> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >>> >>> I'm using SimpleWeb to power a JSON REST API, which gets hit with >>> around 4 requests per second (mainly POST requests). >>> >>> Occasionally I'm finding that my Linux server runs out of file >>> descriptors, and an lsof reveals that its because a bunch of >>> connections are stuck in CLOSE_WAIT. >>> >>> Can anyone suggest what might be causing this? >>> >>> Ian. >>> >>> >> >> >> -- >> Christophe Roudet >> >> >> ---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >> software tools for yourself. Speed compiling, find bugs proactively, >> and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> ********************************************************************** >> ************* The Royal Bank of Scotland plc. Registered in Scotland >> No 90312. >> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. >> Authorised and regulated by the Financial Services Authority. The >> Royal Bank of Scotland N.V. is authorised and regulated by the De >> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and >> is registered in the Commercial Register under number 33002587. >> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. >> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are >> authorised to act as agent for each other in certain jurisdictions. >> >> This e-mail message is confidential and for use by the addressee only. >> If the message is received by anyone other than the addressee, please >> return the message to the sender by replying to it and then delete the >> message from your computer. Internet e-mails are not necessarily >> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland >> N.V. including its affiliates ("RBS group") does not accept >> responsibility for changes made to this message after it was sent. >> >> Whilst all reasonable care has been taken to avoid the transmission of >> viruses, it is the responsibility of the recipient to ensure that the >> onward transmission, opening or use of this message and any >> attachments will not adversely affect its systems or data. No >> responsibility is accepted by the RBS group in this regard and the >> recipient should carry out such virus and other checks as it considers appropriate. >> >> Visit our website at www.rbs.com >> >> ********************************************************************** >> ************* >> >> >> ---------------------------------------------------------------------- >> -------- Download Intel® Parallel Studio Eval Try the new >> software tools for yourself. Speed compiling, find bugs proactively, >> and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: <nia...@rb...> - 2010-03-11 14:56:36
|
I will make sure a try/catch wraps the shutdownOutput method and build a new release. Thanks, Niall -----Original Message----- From: Thierry Boileau [mailto:thb...@gm...] Sent: 11 March 2010 14:37 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT Hello, we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. Best regards, Thierry Boileau > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > > -----Original Message----- > From: Christophe Roudet [mailto:cr...@ac...] > Sent: 11 March 2010 14:04 > To: sim...@li... > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I had the same thing, I have patched > org.simpleframework.transport.SocketWriter.close(). > > I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: > > public synchronized void close() throws IOException { > if(!closed) { closed = true; > builder.close(); > try { > channel.socket().shutdownOutput(); // send FIN ACK > } catch (IOException ioex) { > } > channel.close(); > } > } > > Christophe > > On 3/10/2010 8:26 PM, saviourcat wrote: >> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >> >> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >> >> -- >> Sent using Telkomsel network >> Twitter: @md_ray >> Email/IM: sav...@gm... and md...@ya... >> >> -----Original Message----- >> From: Ian Clarke<ian...@gm...> >> Date: Wed, 10 Mar 2010 16:43:37 >> To:<sim...@li...> >> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I'm using SimpleWeb to power a JSON REST API, which gets hit with >> around 4 requests per second (mainly POST requests). >> >> Occasionally I'm finding that my Linux server runs out of file >> descriptors, and an lsof reveals that its because a bunch of >> connections are stuck in CLOSE_WAIT. >> >> Can anyone suggest what might be causing this? >> >> Ian. >> >> > > > -- > Christophe Roudet > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ********************************************************************** > ************* The Royal Bank of Scotland plc. Registered in Scotland > No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the De > Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and > is registered in the Commercial Register under number 33002587. > Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. > The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are > authorised to act as agent for each other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept > responsibility for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward transmission, opening or use of this message and any > attachments will not adversely affect its systems or data. No > responsibility is accepted by the RBS group in this regard and the > recipient should carry out such virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > ********************************************************************** > ************* > > > ---------------------------------------------------------------------- > -------- Download Intel® Parallel Studio Eval Try the new > software tools for yourself. Speed compiling, find bugs proactively, > and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: <nia...@rb...> - 2010-03-11 14:55:14
|
Mmm, perhaps I should have taken a closer look. If there really is an issue with this I will make sure its fixed and released this evening. Better late than never I guess.. Thanks again, Niall -----Original Message----- From: Christophe Roudet [mailto:cr...@ac...] Sent: 11 March 2010 14:38 To: sim...@li... Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I have already posted the issue I had in April 2009, subject was 'simple-4.1.10 is leaking file handles' Here is the thread : https://sourceforge.net/mailarchive/forum.php?thread_name=8B08881C01E54DF885E38A7E98E3F6C1%40Yo&forum_name=simpleweb-support Christophe On 3/11/2010 9:27 AM, nia...@rb... wrote: > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: Thierry B. <thb...@gm...> - 2010-03-11 14:44:23
|
Hello, we met the same kind of problems when calling Socket#shutdownOutput, specifically on MacOS. Perhaps because the socket was already closed. However, as this method throws exceptions, and since the socket is aimed to be closed, it should be better to add such try/catch clause. Best regards, Thierry Boileau > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > > -----Original Message----- > From: Christophe Roudet [mailto:cr...@ac...] > Sent: 11 March 2010 14:04 > To: sim...@li... > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I had the same thing, I have patched > org.simpleframework.transport.SocketWriter.close(). > > I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: > > public synchronized void close() throws IOException { > if(!closed) { closed = true; > builder.close(); > try { > channel.socket().shutdownOutput(); // send FIN ACK > } catch (IOException ioex) { > } > channel.close(); > } > } > > Christophe > > On 3/10/2010 8:26 PM, saviourcat wrote: >> I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. >> >> Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? >> >> -- >> Sent using Telkomsel network >> Twitter: @md_ray >> Email/IM: sav...@gm... and md...@ya... >> >> -----Original Message----- >> From: Ian Clarke<ian...@gm...> >> Date: Wed, 10 Mar 2010 16:43:37 >> To:<sim...@li...> >> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT >> >> I'm using SimpleWeb to power a JSON REST API, which gets hit with >> around 4 requests per second (mainly POST requests). >> >> Occasionally I'm finding that my Linux server runs out of file >> descriptors, and an lsof reveals that its because a bunch of >> connections are stuck in CLOSE_WAIT. >> >> Can anyone suggest what might be causing this? >> >> Ian. >> >> > > > -- > Christophe Roudet > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the > De Nederlandsche Bank and has its seat at Amsterdam, the > Netherlands, and is registered in the Commercial Register under > number 33002587. Registered Office: Gustav Mahlerlaan 10, > Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and > The Royal Bank of Scotland plc are authorised to act as agent for each > other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept responsibility > for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the onward > transmission, opening or use of this message and any attachments will > not adversely affect its systems or data. No responsibility is accepted > by the RBS group in this regard and the recipient should carry out such > virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > *********************************************************************************** > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Christophe R. <cr...@ac...> - 2010-03-11 14:42:54
|
I have already posted the issue I had in April 2009, subject was 'simple-4.1.10 is leaking file handles' Here is the thread : https://sourceforge.net/mailarchive/forum.php?thread_name=8B08881C01E54DF885E38A7E98E3F6C1%40Yo&forum_name=simpleweb-support Christophe On 3/11/2010 9:27 AM, nia...@rb... wrote: > What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. > Thanks for the feedback. > Niall > |
From: <nia...@rb...> - 2010-03-11 14:28:04
|
What issue were you seeing before you did this? Also what exceptions did you see before this? If there is a problem here ill upload a new release with this as a fix. Thanks for the feedback. Niall -----Original Message----- From: Christophe Roudet [mailto:cr...@ac...] Sent: 11 March 2010 14:04 To: sim...@li... Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I had the same thing, I have patched org.simpleframework.transport.SocketWriter.close(). I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: public synchronized void close() throws IOException { if(!closed) { closed = true; builder.close(); try { channel.socket().shutdownOutput(); // send FIN ACK } catch (IOException ioex) { } channel.close(); } } Christophe On 3/10/2010 8:26 PM, saviourcat wrote: > I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. > > Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? > > -- > Sent using Telkomsel network > Twitter: @md_ray > Email/IM: sav...@gm... and md...@ya... > > -----Original Message----- > From: Ian Clarke<ian...@gm...> > Date: Wed, 10 Mar 2010 16:43:37 > To:<sim...@li...> > Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I'm using SimpleWeb to power a JSON REST API, which gets hit with > around 4 requests per second (mainly POST requests). > > Occasionally I'm finding that my Linux server runs out of file > descriptors, and an lsof reveals that its because a bunch of > connections are stuck in CLOSE_WAIT. > > Can anyone suggest what might be causing this? > > Ian. > > -- Christophe Roudet ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: Christophe R. <cr...@ac...> - 2010-03-11 14:17:06
|
I had the same thing, I have patched org.simpleframework.transport.SocketWriter.close(). I have simply added a try/catch around channel.socket().shutdownOutput() and the file descriptor leak disappered: public synchronized void close() throws IOException { if(!closed) { closed = true; builder.close(); try { channel.socket().shutdownOutput(); // send FIN ACK } catch (IOException ioex) { } channel.close(); } } Christophe On 3/10/2010 8:26 PM, saviourcat wrote: > I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. > > Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? > > -- > Sent using Telkomsel network > Twitter: @md_ray > Email/IM: sav...@gm... and md...@ya... > > -----Original Message----- > From: Ian Clarke<ian...@gm...> > Date: Wed, 10 Mar 2010 16:43:37 > To:<sim...@li...> > Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > I'm using SimpleWeb to power a JSON REST API, which gets hit with > around 4 requests per second (mainly POST requests). > > Occasionally I'm finding that my Linux server runs out of file > descriptors, and an lsof reveals that its because a bunch of > connections are stuck in CLOSE_WAIT. > > Can anyone suggest what might be causing this? > > Ian. > > -- Christophe Roudet |
From: Ian C. <ian...@gm...> - 2010-03-11 14:03:53
|
Will do, thanks for your help! Ian. On Thu, Mar 11, 2010 at 8:01 AM, <nia...@rb...> wrote: > There should be no need, unless you expect a hell of a lot of concurrent clients to be pipelining (when I say clients I mean individual unique clients connecting to the server rather than requests). I would use a connection close ("Connection: close") if you are still seeing file descriptor issues. > > To verify I would do an lsof on the process during normal execution after you have used the SynchronousContainer or something similar. I suspect you should see a reasonable number of open sockets, with very few if any in CLOSE_WAIT. > > > Niall Gallagher > RBS Global Banking & Markets > Office: +44 2070851454 > > -----Original Message----- > From: Ian Clarke [mailto:ian...@gm...] > Sent: 11 March 2010 13:31 > To: Simple support and user issues > Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT > > On Thu, Mar 11, 2010 at 3:58 AM, <nia...@rb...> wrote: >> Response.set("Connection", "close"); > > Should I do this in addition to wrapping my class in a SynchronousContainer? > > Ian. > > -- > Ian Clarke > CEO, SenseArray > Email: ia...@se... > Ph: +1 512 422 3588 > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the > De Nederlandsche Bank and has its seat at Amsterdam, the > Netherlands, and is registered in the Commercial Register under > number 33002587. Registered Office: Gustav Mahlerlaan 10, > Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and > The Royal Bank of Scotland plc are authorised to act as agent for each > other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept responsibility > for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the onward > transmission, opening or use of this message and any attachments will > not adversely affect its systems or data. No responsibility is accepted > by the RBS group in this regard and the recipient should carry out such > virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > *********************************************************************************** > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: <nia...@rb...> - 2010-03-11 14:01:37
|
There should be no need, unless you expect a hell of a lot of concurrent clients to be pipelining (when I say clients I mean individual unique clients connecting to the server rather than requests). I would use a connection close ("Connection: close") if you are still seeing file descriptor issues. To verify I would do an lsof on the process during normal execution after you have used the SynchronousContainer or something similar. I suspect you should see a reasonable number of open sockets, with very few if any in CLOSE_WAIT. Niall Gallagher RBS Global Banking & Markets Office: +44 2070851454 -----Original Message----- From: Ian Clarke [mailto:ian...@gm...] Sent: 11 March 2010 13:31 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT On Thu, Mar 11, 2010 at 3:58 AM, <nia...@rb...> wrote: > Response.set("Connection", "close"); Should I do this in addition to wrapping my class in a SynchronousContainer? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: Ian C. <ian...@gm...> - 2010-03-11 13:37:36
|
On Thu, Mar 11, 2010 at 3:58 AM, <nia...@rb...> wrote: > Response.set("Connection", "close"); Should I do this in addition to wrapping my class in a SynchronousContainer? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |
From: <nia...@rb...> - 2010-03-11 10:01:02
|
Hi, I don't really maintain this, but you can get it from here. http://sourceforge.net/projects/simpleweb/files/simpleweb/4.0.6/simple-servlet-0.8.zip/download Niall Niall Gallagher RBS Global Banking & Markets Office: +44 2070851454 ________________________________ From: Carfield Yim [mailto:car...@ca...] Sent: 10 March 2010 18:49 To: Simple support and user issues Subject: [Simpleweb-Support] Is there simple to servlet adapter? I think it exist once, but I haven't keep the copy, is that discontinue? Like to have this because I would like to try GWT *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: <nia...@rb...> - 2010-03-11 09:59:06
|
Hi, This is the same issue, CLOSED_WAIT means you have forgotten to close the connection. You must do one of the following. 1) OutputStream.close(); // close the output stream if used 2) WritableByteClannel.close(); // close the byte channel if used 3) Response.close(); // the simplest way to close the connection I have tested Simple on Linux, Mac OS X, and Windows, with many millions of requests with no issues. With Linux I have done tests spanning close to 3 days with several hundred million requests at approx 16,000 to 20,000 requests per second. Not one request failed, and not one CLOSE_WAIT. If you close your connecions, all your problems will dissappear. Also, all idle connections are closed after 2 minutes. If you feel your NOT seeing CLOSE_WAIT but are seeing a exhaustion in file descriptors then either increase the number of file descriptors available to your service. Or set the "Connection: close" token to force Simple not to pipline. Response.set("Connection", "close"); The above will force a close if you wish. Niall -----Original Message----- From: saviourcat [mailto:sav...@gm...] Sent: 11 March 2010 01:26 To: Simple support and user issues Subject: Re: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? -- Sent using Telkomsel network Twitter: @md_ray Email/IM: sav...@gm... and md...@ya... -----Original Message----- From: Ian Clarke <ian...@gm...> Date: Wed, 10 Mar 2010 16:43:37 To: <sim...@li...> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. Can anyone suggest what might be causing this? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: <nia...@rb...> - 2010-03-11 09:53:29
|
Hi, Firstly let me explain what CLOSE_WAIT actually means. CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection. So you are not closing your end of the socket. The servicing model employed by Simple is very different from that used by Servlets. With Servlets the container handles request completion by flushing an closing the request for you. However, with Simple you MUST close the connection yourself. Why? Well you must close the connection yourself because if the container closed it then you could not perform asynchronous processing. For most people asynchronous processing is an advanced feature they do not need. If you are such a person then your server REALLY SHOULD do something like so. public class SynchronousContainer implements Container { private final Container realContainer; public SynchronousContainer(Container realContainer){ this.realContainer = realContainer; } public void handle(Request request, Response response){ try{ realContainer.handle(request,response); }finally{ try{ response.close(); }catch(Exception e){ // ignore... } } } } With the above container wrapper you are guaranteed that all requests are close regardless of whether exceptions are thrown or whether you forget to close it yourself. This is how a Servlet Container works. Niall Niall Gallagher RBS Global Banking & Markets Office: +44 2070851454 -----Original Message----- From: Ian Clarke [mailto:ian...@gm...] Sent: 10 March 2010 22:44 To: sim...@li... Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. Can anyone suggest what might be causing this? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
From: saviourcat <sav...@gm...> - 2010-03-11 01:25:08
|
I experience exactly the same thing. After running out of file descriptor, the http listener won't accept any more connection. Actually I already posted this problem I encountered sometime ago, and Niall told me to check whether there is still non-closed connection. I don't know whether I'm doing something wrong or not, but then I just create a simple echo web application and still behaves like this. OS issue? Or the http client? -- Sent using Telkomsel network Twitter: @md_ray Email/IM: sav...@gm... and md...@ya... -----Original Message----- From: Ian Clarke <ian...@gm...> Date: Wed, 10 Mar 2010 16:43:37 To: <sim...@li...> Subject: [Simpleweb-Support] TCP connections stuck in CLOSE_WAIT I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. Can anyone suggest what might be causing this? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Ian C. <ian...@gm...> - 2010-03-10 22:44:04
|
I'm using SimpleWeb to power a JSON REST API, which gets hit with around 4 requests per second (mainly POST requests). Occasionally I'm finding that my Linux server runs out of file descriptors, and an lsof reveals that its because a bunch of connections are stuck in CLOSE_WAIT. Can anyone suggest what might be causing this? Ian. -- Ian Clarke CEO, SenseArray Email: ia...@se... Ph: +1 512 422 3588 |