You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Chris S <ch...@googlemail.com> on 2011/04/20 10:57:10 UTC
Why does every NioSocketConnector create at least 8 Connections ?
Hello Mina-Users,
we are using Mina to access different types of network devices (Webcams,
Digital-IO-Boxes, Access Control Systems,...). For every type of device we
use a dedicated IoConnector because of the different protocols. Under some
circumstances we get an "java.net.SocketException: No buffer space available
(maximum connections reached?): connect". We figured out that for every
created NioSocketConnector 8 connections will be created from localhost to
localhost with different ports, even if we do no connect at all. So if we
use many NioSocketConnector's we quickly run out of available ports, i
guess.
Is it possible to tune the NioSocketConnector so it only opens a port when
we call #connect(..) ?
Thanks in advance
Chris
Re: Why does every NioSocketConnector create at least 8 Connections ?
Posted by Francesco Vivoli <f....@gmail.com>.
It's single core with hyper-threading
F
On Tue, Apr 26, 2011 at 2:28 PM, Emmanuel Lécharny <el...@apache.org>wrote:
> On 4/26/11 2:18 PM, Francesco Vivoli wrote:
>
>> We have seen this on windows yes (albeit I don't have a windows machine
>> myself, our pre-production and production environments run on windows)
>>
>
> How many CPU/Core do you have on this machine ?
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
Re: Why does every NioSocketConnector create at least 8 Connections
?
Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/26/11 2:18 PM, Francesco Vivoli wrote:
> We have seen this on windows yes (albeit I don't have a windows machine
> myself, our pre-production and production environments run on windows)
How many CPU/Core do you have on this machine ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Why does every NioSocketConnector create at least 8 Connections ?
Posted by Francesco Vivoli <f....@gmail.com>.
We have seen this on windows yes (albeit I don't have a windows machine
myself, our pre-production and production environments run on windows)
On Tue, Apr 26, 2011 at 11:54 AM, Emmanuel Lécharny <el...@apache.org>wrote:
> On 4/26/11 11:17 AM, Francesco Vivoli wrote:
>
>> I'm stepping in here, as I also have noticed the same issue. I think I
>> posted about this on the ml.
>> It seems that this pattern doesn't show up under *nix (Linux/BSD)
>> though...
>>
> Are you on windows ?
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
Re: Why does every NioSocketConnector create at least 8 Connections
?
Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/26/11 11:17 AM, Francesco Vivoli wrote:
> I'm stepping in here, as I also have noticed the same issue. I think I
> posted about this on the ml.
> It seems that this pattern doesn't show up under *nix (Linux/BSD) though...
Are you on windows ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Why does every NioSocketConnector create at least 8 Connections ?
Posted by Francesco Vivoli <f....@gmail.com>.
I'm stepping in here, as I also have noticed the same issue. I think I
posted about this on the ml.
It seems that this pattern doesn't show up under *nix (Linux/BSD) though...
Regards
Francesco
On Thu, Apr 21, 2011 at 10:59 AM, Chris S <ch...@googlemail.com> wrote:
> I filed JIRA Ticket including my simple testcase, you can find it here
> https://issues.apache.org/jira/browse/DIRMINA-831
>
> Thanks for your support Emmanuel !
>
Re: Why does every NioSocketConnector create at least 8 Connections ?
Posted by Chris S <ch...@googlemail.com>.
I filed JIRA Ticket including my simple testcase, you can find it here
https://issues.apache.org/jira/browse/DIRMINA-831
Thanks for your support Emmanuel !
Re: Why does every NioSocketConnector create at least 8 Connections
?
Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/20/11 2:28 PM, Chris S wrote:
>>
>>> which MINA version are you using ?
>
> v2.0.2
Strange... AFAIR, there was an issue in an older revision, where we were
opening connection to localhost to determinate the socket capacity
(buffer limits, etc). I think we killed such a "feature" a while back.
I'm going to investigate the problem. Can you fill a JIRA for your problem ?
Thanks !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: Why does every NioSocketConnector create at least 8 Connections ?
Posted by Chris S <ch...@googlemail.com>.
>
>
>> which MINA version are you using ?
v2.0.2
Re: Why does every NioSocketConnector create at least 8 Connections
?
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 4/20/11 10:57 AM, Chris S wrote:
> Hello Mina-Users,
Hi,
which MINA version are you using ?
> we are using Mina to access different types of network devices (Webcams,
> Digital-IO-Boxes, Access Control Systems,...). For every type of device we
> use a dedicated IoConnector because of the different protocols. Under some
> circumstances we get an "java.net.SocketException: No buffer space available
> (maximum connections reached?): connect". We figured out that for every
> created NioSocketConnector 8 connections will be created from localhost to
> localhost with different ports, even if we do no connect at all. So if we
> use many NioSocketConnector's we quickly run out of available ports, i
> guess.
>
> Is it possible to tune the NioSocketConnector so it only opens a port when
> we call #connect(..) ?
>
> Thanks in advance
> Chris
>
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com