Bitcoin Forum
May 13, 2024, 09:25:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: max connections  (Read 261 times)
callmejoe (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 22


View Profile WWW
June 29, 2019, 02:45:08 AM
 #1

i have 2 full nodes running on my lan. on one max connections are set to 20.  the other is unlimited.  for some reason i cant get more than 20 on the one that is set to unlimited. is it just coincidence that the number of connections on the unlimited config happens to be equal to what i set the max connections to on the other?



 
1715592346
Hero Member
*
Offline Offline

Posts: 1715592346

View Profile Personal Message (Offline)

Ignore
1715592346
Reply with quote  #2

1715592346
Report to moderator
1715592346
Hero Member
*
Offline Offline

Posts: 1715592346

View Profile Personal Message (Offline)

Ignore
1715592346
Reply with quote  #2

1715592346
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715592346
Hero Member
*
Offline Offline

Posts: 1715592346

View Profile Personal Message (Offline)

Ignore
1715592346
Reply with quote  #2

1715592346
Report to moderator
1715592346
Hero Member
*
Offline Offline

Posts: 1715592346

View Profile Personal Message (Offline)

Ignore
1715592346
Reply with quote  #2

1715592346
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4186



View Profile
June 29, 2019, 06:35:35 PM
Last edit: June 30, 2019, 06:12:41 AM by ranochigo
 #2

Are you using the same ports (8333) on both of the clients?

This is just a hypothesis since I've never tried it before: If you're running them on the same port with the same public IP, both of your nodes are receiving the same information from the same 12 incoming nodes. Since the information are mirrored to both of the nodes, it is likely that there is a conflict and your other node is rejecting the connection from the extra nodes. Try checking the IPs connected to each of your nodes.

Nevermind, I thought about it further and realised that the nature of TCP wouldn't let 2 programs to be binded to the same port and routers wouldn't have allowed this with port forwarding anyways.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
callmejoe (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 22


View Profile WWW
June 29, 2019, 06:49:46 PM
 #3

the node set with max connections= 20 is using port 8333
the other node with unlimited connections is using 8334

callmejoe (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 22


View Profile WWW
June 29, 2019, 08:16:58 PM
 #4

In first place, how do you manage to configure your client to allow unlimited connection? AFAIK there's no such configuration, Do you simply set very big value on -maxconnections command?

Anyway, it sounds like a coincidence & i think you should let it run for a while and see if there's a moment where there are more than 20 connection.

sorry, didn't mean unlimited.  i just meant i didn't set a maximum.

i'll keep watching it, but it's been a few days already.



TheWolf666
Full Member
***
Offline Offline

Activity: 615
Merit: 154


CEO of Metaisland.gg and W.O.K Corp


View Profile WWW
July 08, 2019, 04:46:49 PM
Merited by CryptopreneurBrainboss (2), bones261 (2), ABCbits (1)
 #5

i have 2 full nodes running on my lan. on one max connections are set to 20.  the other is unlimited.  for some reason i cant get more than 20 on the one that is set to unlimited. is it just coincidence that the number of connections on the unlimited config happens to be equal to what i set the max connections to on the other? 

By default Unlimited = 125
But Bitcoin evaluates your hardware and set a limit by itself.

Here is the code

Code:
/** The maximum number of peer connections to maintain. */
static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;

If you want a lot of connection you can specify maxconnections=1000 in bitcoin.conf or in command line with -maxconnections=1000

If you specify a very high number, Bitcoin will calculate the most your hardware can handle. It will say nothing if your hardware can accept the number you entered, but if this number is higher than the most Bitcoin evaluated, you will get a popup with a warning telling you what maximum Bitcoin can set for your hardware.

Heisenberg_Hunter
Legendary
*
Offline Offline

Activity: 1583
Merit: 1276


Heisenberg Design Services


View Profile WWW
July 10, 2019, 05:24:26 AM
Merited by ABCbits (1), HCP (1), TheWolf666 (1)
 #6

Maximum number of connections in bitcoin node was the topic which kept me rumbling over a few months back. There is some really good discussion about max connection in this topic : https://bitcointalk.org/index.php?topic=5109163.0

If you set -maxconnections=20 your node is connected to 12 incoming connections and 8 outgoing connections. The maxconnections has nothing to do with outgoing connections and it just controls how many other nodes connect to you. If you leave the -maxconnections undefined your node will allow atmost 117 other nodes to connect to you by default. That's the default limit specified in the code as TheWolf666 mentioned above. And in order for you to get the 117 incoming it takes time for other nodes to connect to you.

If you want a lot of connection you can specify maxconnections=1000 in bitcoin.conf or in command line with -maxconnections=1000.

For most of the time, the -maxconnections will probably drop to 845 connections or similar if we are specifying -maxconnections=1000 based on your file descriptors. We can change the configuration and make the node to connect to more than 845 too but that would be too bad for the PC and I recommend not trying that out.

See this

Leaving it undefined (commented out) bitcoind outputs (and logs) this:
Using at most 125 automatic connections (1024 file descriptors available)

If 1 (either bitcoin.conf or -maxconnections=1, it shows this:
Using at most 1 automatic connections (1024 file descriptors available)

Using "2000" like the OP wanted, it shows this:
Using at most 865 automatic connections (1024 file descriptors available)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!