Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Masternodes running on IPv6 will not allow more than 16 connections #2696

Open
DeanSparrow opened this issue Dec 22, 2021 · 4 comments

Comments

@DeanSparrow
Copy link

Masternodes running on IPv6 will not allow more than 16 connections

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Added maxconnections=256 to pivx.conf
  2. Tested on Multiple masternodes on Ubuntu 18

Expected behavior

Masternodes on IPv6 should allow more connections

Actual behavior

Masternodes running on IPv6 will not allow more than 16 connections

Screenshots.

If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.

What version of PIVX Core are you using?

"version": 5040000,
"protocolversion": 70924,
"services": "NETWORK/BLOOM/",
"walletversion": 170000,

Machine specs:

  • OS: Ubuntu 18.04.5 LTS
  • CPU: VPS 4 vCPU Cores
  • RAM: 8GB
  • Disk size: 200 GB
  • Disk Type (HD/SDD): SSD

Any extra information that might be useful in the debugging process.

This is normally the contents of a debug.log, db.log or config.log file. Raw text or a link to a pastebin type site are preferred.

@PeterL73
Copy link

maxconnections sets the most connections to peers (in + outbound)

the most automatic outbound connections are limited to 16

PIVX/src/net.h

Lines 60 to 61 in 5a7b514

/** Maximum number of automatic outgoing nodes */
static const int MAX_OUTBOUND_CONNECTIONS = 16;

@DeanSparrow
Copy link
Author

Hi Peter
Thanks for taking a look.
With IPv4 we can 'override this' by adding
maxconnections=XX to pivx.conf
for IPv6 it does not "override".

@skironDotNet
Copy link

Limiting connection is a good thing, the server CPU suffers when there is too many threads. usually up to 16 connections is ok to support the network but I checked my nodes on IPv6 and I have some with 37 connections, so not sure what the problem is

@skironDotNet
Copy link

As I dive deeper into the subject I realized there are 2 aspects and now this #2696 (comment) answer makes sense.

There are incoming connection and outgoing connections.
Incoming connections are what matters the most because this is that other clients and nodes can connect to you, and this is your maxconnections the outgoing connections are the ones your node makes to sync with others, and it doesn't need that much connections, 16 is plenty to make you connect to at least 3 valid nodes at the same time.

like I said "on IPv6 and I have some with 37 connections" this means 16 is like outgoing, and 21 is incoming, my limit is set to 128

I vote to close this ticket as not an issue, all works OK by design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants