Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Atroxes on May 20, 2014, 10:52:44 AM



Title: My Ubuntu full node is only using 10 connections (fixed)
Post by: Atroxes on May 20, 2014, 10:52:44 AM
I recently set up a full bitcoind node in Ubuntu 14.04 x64. Here's the bitcoin.conf excluding rpc info:

Code:
server=1
gen=0
port=8334
daemon=1
debug=0
upnp=1
externalip=87.xxx.xxx.xxx
maxconnections=200
timeout=15000

The node is behind a NAT. External IP is written correctly in the config. I've had to change to port 8334, but it is forwarded fine and I'm getting more than 8 connections. The node is listed at https://getaddr.bitnodes.io as well and should be reachable and should be functioning correctly.

However, I'm only hovering around 10-11 connections. The node is on a dedicated machine with a decent fibre connection and I want to allow 100+ connections and support the network.

I tried simply waiting, but after 24~ hours its still at 10 connections, sometimes 11.
I have a Windows machine behind the same NAT that has port 8333 forwarded and its connection count is currently at 59.

What am I doing wrong? :)

Thanks!


Title: Re: My Ubuntu full node is only using 10 connections
Post by: Atroxes on May 23, 2014, 05:15:48 AM
No idea if its allowed, but I'm bumping this post once for visibility. The problem still boggles my mind :/


Title: Re: My Ubuntu full node is only using 10 connections
Post by: 2112 on May 23, 2014, 06:06:45 AM
Last time I looked into the Satoshi client code it either ignored or de-prioritized peers listening on a non-default port.


Title: Re: My Ubuntu full node is only using 10 connections
Post by: Atroxes on May 23, 2014, 02:36:34 PM
Last time I looked into the Satoshi client code it either ignored or de-prioritized peers listening on a non-default port.
Will try and change it to the default then, and disable my other machine.


Title: Re: My Ubuntu full node is only using 10 connections
Post by: zvs on May 23, 2014, 03:12:08 PM
edit the source code and change the # of outgoing connections.  i do 500 on a dedicated gigabit line.  this bursts up to 60-90MB/s for a second or two when a new block hits the network.

i tested it on my home connection once & after a new block, it'd saturate the upstream for a good 30s or so.  i guess that'd be a good way to slow down propagation, having 500+ connections and then limit upstream to 512Kbps or so.


Title: Re: My Ubuntu full node is only using 10 connections
Post by: Atroxes on May 23, 2014, 05:48:45 PM
Last time I looked into the Satoshi client code it either ignored or de-prioritized peers listening on a non-default port.

Yup, that was the culprit. I read somewhere you could change the port and well... you can change it, but noone will connect to you then :) Thanks!


Title: Re: My Ubuntu full node is only using 10 connections
Post by: Atroxes on May 23, 2014, 05:50:54 PM
edit the source code and change the # of outgoing connections.  i do 500 on a dedicated gigabit line.  this bursts up to 60-90MB/s for a second or two when a new block hits the network.

i tested it on my home connection once & after a new block, it'd saturate the upstream for a good 30s or so.  i guess that'd be a good way to slow down propagation, having 500+ connections and then limit upstream to 512Kbps or so.
That's probably a pretty bad idea, considering you're then eating up connection slots when you don't really need to, since you're perfectly able to be reached by other users. Editing your own outgoing connections beyond the standard 8, means there's less room for those who cannot forward port 8333 when behind a NAT.


Title: Re: My Ubuntu full node is only using 10 connections
Post by: zvs on May 23, 2014, 11:23:23 PM
edit the source code and change the # of outgoing connections.  i do 500 on a dedicated gigabit line.  this bursts up to 60-90MB/s for a second or two when a new block hits the network.

i tested it on my home connection once & after a new block, it'd saturate the upstream for a good 30s or so.  i guess that'd be a good way to slow down propagation, having 500+ connections and then limit upstream to 512Kbps or so.
That's probably a pretty bad idea, considering you're then eating up connection slots when you don't really need to, since you're perfectly able to be reached by other users. Editing your own outgoing connections beyond the standard 8, means there's less room for those who cannot forward port 8333 when behind a NAT.

not really, since I have 1000 max connections.  it doesn't use epoll, so it crashes once you hit 1024 or so.

i've never gone above 800, w/ 500 outgoing

if i didn't set it for 500 outgoing connections, i'd max out at around 300.  since i have sufficient bandwidth to handle 800 connections, it's then better to open 500 outgoing ones