Re: Too many open files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using HttpClient to connect to apache from tomcat for load
balancing. I also call HttpMethod.releaseConnection() but still there
is a problem.

On Tue, Oct 7, 2008 at 6:04 PM, André Warnier <aw@xxxxxxxxxx> wrote:
> You are talking about Apache and Tomcat, but unless I am mistaken, what you
> are showing below as the result of lsof, is only java processes, which
> cannot be Apache.
> Are you sure you somehow do not have a loop where Tomcat is connecting back
> to itself on the http port ? or from Tomcat to Apache ?
>
>
> Mohit Anchlia wrote:
>>
>> I got too many open files on my tomcat server but I see 994 instances
>> following connected to apache:
>>
>> java    14130 root  965u  IPv4 30842366               TCP
>> localhost:41838->localhost:http (CLOSE_WAIT)
>> java    14130 root  966u  IPv4 30842367               TCP
>> localhost:41839->localhost:http (CLOSE_WAIT)
>> java    14130 root  967u  IPv4 30842371               TCP
>> localhost:41841->localhost:http (CLOSE_WAIT)
>> java    14130 root  968u  IPv4 30842465               TCP
>> localhost:41895->localhost:http (CLOSE_WAIT)
>> java    14130 root  969u  IPv4 30848501               TCP
>> localhost:42415->localhost:http (CLOSE_WAIT)
>> java    14130 root  970u  IPv4 30842533               TCP
>> localhost:41936->localhost:http (CLOSE_WAIT)
>> java    14130 root  971u  IPv4 30842468               TCP
>> localhost:41898->localhost:http (CLOSE_WAIT)
>> java    14130 root  972u  IPv4 30842534               TCP
>> localhost:41937->localhost:http (CLOSE_WAIT)
>> java    14130 root  973u  IPv4 30842765               TCP
>> localhost:42062->localhost:http (CLOSE_WAIT)
>> java    14130 root  974u  IPv4 30842472               TCP
>> localhost:41901->localhost:http (CLOSE_WAIT)
>> java    14130 root  975u  IPv4 30842122               TCP
>> localhost:41694->localhost:http (CLOSE_WAIT)
>> java    14130 root  976u  IPv4 30842123               TCP
>> localhost:41695->localhost:http (CLOSE_WAIT)
>> java    14130 root  977u  IPv4 30843217               TCP
>> localhost:42188->localhost:http (CLOSE_WAIT)
>> java    14130 root  978u  IPv4 30842125               TCP
>> localhost:41696->localhost:http (CLOSE_WAIT)
>>
>> I get
>>
>> java.net.SocketException: Too many open files
>>        at java.net.PlainSocketImpl.socketAccept(Native Method)
>>        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>>        at java.net.ServerSocket.implAccept(ServerSocket.java:450)
>>        at java.net.ServerSocket.accept(ServerSocket.java:421)
>>        at
>> org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
>>        at
>> org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
>>        at java.lang.Thread.run(Thread.java:595)
>>
>> Could you please advise? I also don't understand why CLOSE_WAIT
>> contribute to too many open files. My file size is set to 1024 files
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux