Any reproduceable test code is appreciated.

Thanks,

On Thu, 15 May 2008 20:13:34 +0900, Maziyar Eslamieh <[EMAIL PROTECTED]> wrote:

Thanks

This is my problem exactly:
When client disconnect from server this exception is throw in server:
 java.io.IOException: Connection reset by peer

then server perform below method:

public void exceptionCaught(IoSession session, Throwable cause) {
        cause.printStackTrace();
        session.close();
}

After clossing connection in linux i do this command:
 lsof|grep 9781|wc -l   (9781 PID of server process)
I see that result of this command increase and after 1 day this number isn't reduced. so after long time is throw java.net.SocketException: Too many files open in MINA2 .
I set  "ulimit -n 1024000".
What should i do?


--- On Tue, 5/13/08, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:

From: Emmanuel Lecharny <[EMAIL PROTECTED]>
Subject: Re: java.net.SocketException: Too many files open in MINA2
To: [email protected]
Date: Tuesday, May 13, 2008, 2:29 PM
More than any of those suggestion, jsut read Niklas'
added FAQ :
http://cwiki.apache.org/confluence/display/FTPSERVER/FAQ#FAQ-Myserverfailswithjava.net.SocketException%3AToomanyfilesopen

2008/5/13 Stanley Ding <[EMAIL PROTECTED]>:
> My suggestions:
>
>  1, add the following line in your linux shell script:
>     ulimit -n 65535
>
>  2, set idle time for every session
>  It makes sure there's no dead connection in your
application.
>
>  3, acceptor.getSessionConfig().setSoLinger(-1);
>  It decreases the number of closing connections.
>
>  By the way, 1690 connections (sessions in mina) is
OK, but if the number reaches 16900, your application will
die...
>
>  hope these help.Thanks
>
>
>
>  > Date: Mon, 12 May 2008 04:08:09 -0700> From:
[EMAIL PROTECTED]> Subject: Re:
java.net.SocketException: Too many files open in MINA2>
To: [email protected]> > Thanks> How many socket
is opened in MINA2? and why do i have 1690 opened socket
hear?> Where do i set tcp_time_wait parameter in
MINA2?> > --- On Mon, 5/12/08, Emmanuel Lecharny
<[EMAIL PROTECTED]> wrote:> > > From:
Emmanuel Lecharny <[EMAIL PROTECTED]>> >
Subject: Re: java.net.SocketException: Too many files open
in MINA2> > To: [email protected]> > Date:
Monday, May 12, 2008, 1:57 PM> > Maziyar Eslamieh
wrote:> > > Thank you,> > > I did it ,but
why did the number of opened> > files(socket) of MINA2
reach to 1690 ?> > > > > Because on Linux, a
socket is counted as an open file.> > Socket remains
> > open or waiting for being close for a certain
time,> > depending on your > > system
configuration. You can change this by modifying the>
> tcp_time_wait > > parameter, to lower the
terminaison time.> > > > --
>
>   > > --> > cordialement, regards,>
> Emmanuel Lécharny> > www.iktek.com> >
directory.apache.org> > >
____________________________________________________________________________________>
Be a better friend, newshound, and > know-it-all with
Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
_________________________________________________________________
>  Invite your mail contacts to join your friends list
with Windows Live Spaces. It's easy!
>
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com






--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to