cd /proc/{my pid}/fd
ls -l | wc -l
I see the number is constantly increasing.
Most of the files are something like this:
ls -l | less
lrwx------ 1 root root 64 Mar 5 19:51 999 -> socket:[178198
After the number reaches 4096 I'm getting
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241)
at io.netty.channel.socket.nio.NioServerSocketChannel.doReadMessages(NioServerSocketChannel.java:135)
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:68)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
Could you please tell me what it could be? Looks like connections are not getting closed for some reason.
I'm using HttpClient to send requests to other servers, nothing fancy, but what possibly could lead to such situation?
Thank you,
Eugene
Hi,
I think you may have a bug in your code. Double check lines 23 to 28 (or other, it's hard to guess).
Let us know how is your progress with the issue.
Regards,
Witold Szczerba
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/jyy5oBAOLoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
request.response().close();
request.response().end();
and now I see the number of opened file is stable.
I found this information here:
http://vertx.io/core_manual_java.html
But I nether saw it in the examples, here for instance:
https://github.com/vert-x/vertx-examples/blob/master/src/raw/java/proxy/ProxyServer.java
Looks like after line 51 we should be closing the response:
req.response().close()
Am I correct?
I wander how did you get lines 23 or 28? I’m not sure what are you referring to.
On Mar 5, 2015, at 8:23 PM, wrote:
Hi,
I think you may have a bug in your code. Double check lines 23 to 28 (or other, it's hard to guess).
Let us know how is your progress with the issue.Regards,
Witold Szczerba